That is a great way of paralyzing yourself .... and killing yourself instantly if you do it with enough force
Here's the story of Serbian player Boban Janković, who in 1993 paralyzed himself when he smashed his head up against a padded concrete post.
https://www.youtube.com/watch?v=1cfPr-D_4iY
As funny as it looks, smashing your head up against a wall is absolutely dangerous. If your head is just at the right angle with enough force behind it, you can paralyze yourself ... with just bit more force, you kill yourself.