This problem might be due to any sort of misplacement of update or boot files on your smartphone. To overcome this problem, first you will need to hard rest the phone to bring the files back to their original positions. To do that, there are two ways:
If you know the security code of your smartphone...
Yes, if you know the factory reset code of your phone, the you can simply go to the security setting in your smartphone and restore the set to the factory settings.
If you don't remember such code...
Now, if you do not remember the factory reset code of your phone, follow the below steps to hard reset it.
1)Switch off your handset.
2) Press Home key, volume down key and Switch on/off key simultaneously and wait till any triangle shaped logo appears.
3) After that, release the buttons and follow the options on the screen to erase the phone data and restore it to its original settings.
You are done! Now update the phone according to your normal procedure and hopefully you will not get any sort of error.