How to stop phone turning on when I turn up the volume?

When I listen to music on my iPhone 4 and turn up the volume the screen turns on and then doesn't lock itself. Does anyone know how to stop this happening?

Could be a simple 'goof' for lack of a better word. Try restarting the phone & that should solve it.