two or more render/redirect in the same method
Some notes:


Keep your controllers lean, this is too much code for an action. 
The photo upload should be done as a part of the object's save chain (after validation), so create a before_save callback in the User model that returns false if the upload fails. 
You set r (cryptic name) but don't use it anywhere? does the upload raise an exception on error?


At the end the controller should look extremely simple, something like:

def update
  @user = current_user

  if @user.update_attributes(params[:user])
    render action: 'edit'
  else
    redirect_to photo_path, flash: {alert: t(:text_photo_edit_failed)}
  end
end


Any additional logic should be in User. Models are easy to test in isolation, controllers on the other hand have a lot of state to worry about.