Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
That error is related to your computer, a driver issue. So first uninstall iTunes and all its related files/apps from the computer. See here --> https://support.apple.com/en-gb/HT204275
Restart the computer and then force-restore the iPhone to factory settings through iTunes by putting it to DFU (Device Firmware Upgrade) mode, which will erase everything from it.
Follow the steps below to restore your iPhone by putting it to DFU Mode.
Download and install latest iTunes on your computer from here : https://www.apple.com/itunes/download/
Then connect the iPhone to your computer with the USB Cable.
Open iTunes application on your computer.
On your iPhone press and hold the Home button and the Power button at the same time.
After EXACTLY 8 seconds release the Power button. Continue holding the home button until your iTunes shows a message telling you that it has detected an iPhone in recovery mode.
Click OK or Restore
Note : Put it to DFU Mode while connected to computer and also in DFU Mode your iPhone will remain blank and will be unresponsive. It is normal. Timing is critical when you put it to DFU Mode. So keep trying until it goes to DFU Mode.
Please let me know if that didn't work, so I will continue to help you until we fix the problem