Skip to content

Commit

Permalink
remoteproc: remove redundant NULL check before release_firmware()
Browse files Browse the repository at this point in the history
release_firmware deals gracefully with NULL pointers, so checking
first is redundant.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jesper Juhl authored and Jiri Kosina committed Apr 30, 2012
1 parent cf92549 commit 3cc6e78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@ static void rproc_fw_config_virtio(const struct firmware *fw, void *context)
goto out;

out:
if (fw)
release_firmware(fw);
release_firmware(fw);
/* allow rproc_unregister() contexts, if any, to proceed */
complete_all(&rproc->firmware_loading_complete);
}
Expand Down

0 comments on commit 3cc6e78

Please sign in to comment.