Browse Source

remoteproc: remove redundant NULL check before release_firmware()

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>
Jesper Juhl 13 years ago
parent
commit
3cc6e78777
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/remoteproc/remoteproc_core.c

+ 1 - 2
drivers/remoteproc/remoteproc_core.c

@@ -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);
 }