Yes thats exactly what's happening to my galaxy S5. When I turn it on, it automatically shuts down and then the samsung logo ramains on the screen for few minutes and then it automatically restarts and it goes on an on.
I'm definitely gonna try this with my phone.Will let you know if it worked.