Finding the standard deviation of observable [closed]

I'm currently reading Quantum Computation and Quantum Information by Nielsen. I'm struggling to solve exercise 2.58. The problem is

Suppose we prepare a quantum system in an eigenstate $|\psi\rangle$ of some observable $M$, with corresponding eigenvalue m. What is the average observed value of $M$, and the standard deviation?

The average is easy to find, $$\langle M \rangle = \langle \psi | M | \psi \rangle = m \langle \psi | \psi \rangle = m.$$

The standard deviation is by definition, $$\Delta(M) = \sqrt{\langle M^2 \rangle - \langle M \rangle^2} = \sqrt{\langle M^2 \rangle - m^2}$$.

So you just need find the value of $\langle M^2 \rangle$, $$\langle M^2 \rangle = \langle \psi | M^2 | \psi \rangle = m \langle \psi | M | \psi \rangle = m^2,$$ which give the standard deviation of zero.

It's violating Heisenberg uncertainty principle so I believe that I've got something wrong. What is the correct answer to this exercise?

closed as off-topic by Kyle Kanos, stafusa, Jon Custer, JamalS, ZeroTheHeroOct 10 '17 at 0:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Kyle Kanos, stafusa, Jon Custer, JamalS, ZeroTheHero
If this question can be reworded to fit the rules in the help center, please edit the question.