Skip to content

Commit

Permalink
wireless, at76c50x:: Don't needlessly test for NULL before calling re…
Browse files Browse the repository at this point in the history
…lease_firmware()

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>
  • Loading branch information
Jesper Juhl authored and John W. Linville committed Apr 12, 2012
1 parent ec71a07 commit c987ce9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/at76c50x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c987ce9

Please sign in to comment.