tools: Correct error handling in fit_image_process_hash()