Get a custom rom from xda, flash it. Use it for couple of hours then flash back the stock rom. If it doesn't help then take out the back. Remove camera, clean the connector and reconnect it. It'll will work. If still it doesn't work then board ke IC ka problem hai.