]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
wireless, at76c50x:: Don't needlessly test for NULL before calling release_firmware()
authorJesper Juhl <jj@chaosbits.net>
Mon, 9 Apr 2012 20:50:47 +0000 (22:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Apr 2012 19:06:07 +0000 (15:06 -0400)
The release_firmware() function deals gracefully with being passed a
NULL pointer, so explicit tests before the call are rather pointless.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/at76c50x-usb.c

index 4045e5ab0555a3cbd2f55b1aa0e413a137f6f7f0..faa8bcb4aac1efe6bd9d62242176b71f4544a254 100644 (file)
@@ -2512,10 +2512,8 @@ static void __exit at76_mod_exit(void)
 
        printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " unloading\n");
        usb_deregister(&at76_driver);
-       for (i = 0; i < ARRAY_SIZE(firmwares); i++) {
-               if (firmwares[i].fw)
-                       release_firmware(firmwares[i].fw);
-       }
+       for (i = 0; i < ARRAY_SIZE(firmwares); i++)
+               release_firmware(firmwares[i].fw);
        led_trigger_unregister_simple(ledtrig_tx);
 }