Welcome to Android Central! Give us more details about the camera failure. Does it happen all of the time? Is it both front and rear cameras, or just the rear?
Try booting into Safe Mode, which temporarily disables all 3rd party apps. The steps for the S5 should work:
https://support.t-mobile.com/docs/DOC-10696
If the problem disappears in Safe Mode, then something you installed is causing the problem. You may have to uninstall apps one by one until the problem disappears. If the problem persists in Safe Mode, then it's more likely to be a hardware or firmware problem.