Follow the steps
1. With the iPhone 4 disconnected from
your computer, power it off. Press and hold
the Power button on the top of the device
for a few seconds, then slide the red slider.
If this method doesn’t work, press and hold
the Power and Home buttons for a few
seconds until it goes off.
2. With the iPhone 4 off, press and hold the
Home button while connecting it to the
computer you registered it from. It should
then power on.
3. Keep holding the Home button until you see
a Connected to iTunes message appear on the
screen.
4. Open iTunes and it should provide a
message about an iPhone connected in
Recovery Mode.
5. In iTunes, select the Summary tab and
click Restore and follow the prompts.
When the process is finished, your iPhone 4
should be available again without the need
for a password.