One does not have an operation on their mind. It is impossible.
One of the following sentences is nonsensical. Which one is it?

A: "he had an operation on his mind yesterday"
B: "he had an operation on his brain yesterday"