]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb/storage/ene_ub6250: Remove redundant NULL check before release_firmware() and...
authorJesper Juhl <jj@chaosbits.net>
Mon, 9 Apr 2012 20:52:04 +0000 (22:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Apr 2012 20:52:35 +0000 (13:52 -0700)
release_firmware() tests for a NULL pointer, so it's redundant to do
that checking before calling it.

Additionally, in ene_load_bincode(), 'sd_fw' is a local variable so
setting it to NULL just before it goes out of scope is completely
pointless, so remove that assignment.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/ene_ub6250.c

index e7e678109500bd776e7d87ea27d16672166a0a9a..b28f2ad127d493aef0cdd6891d638ff8eba2f694 100644 (file)
@@ -1933,11 +1933,7 @@ static int ene_load_bincode(struct us_data *us, unsigned char flag)
        kfree(buf);
 
 nofw:
-       if (sd_fw != NULL) {
-               release_firmware(sd_fw);
-               sd_fw = NULL;
-       }
-
+       release_firmware(sd_fw);
        return result;
 }