In order to fix this issue, you can try to clear the cache on your camera application. To do that, you need to go to Settings -> Application( or Application manager; depending on the Android version) -> System Applications (or All Application) -> tap on your camera application and tap Clear Cache. Now you need to reboot the device and the camera should work.