Many of the Galaxy users face the Camera failed problem.If your camera is not working on Samsung Galaxy and displays the message as “WARNING : CAMERA FAILED” then try the possible solution to fix the camera problem.
Try to reset the device to Factory settings.
Format your Memory card. Note: backup important files.
Update your Samsung Galaxy to new firmware because your old firmware what you have currently on your phone can have bugs.If the update is not available then erase your phone fully and flash the phone.
Disable the Location option in your Samsung Galaxy.
NOTE : Method 4 fixed my camera problem.
Please feel free to share your problems.
For Further Reading,