It’s both, but I’ve eaten “corn smut” in a quesadilla, and it was really tasty.
I’ve seen it on the stalk and couldn’t imagine eating it.