ueagle-atm: Delete unnecessary checks before the function call "release_firmware"
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 5 Feb 2015 15:33:09 +0000 (16:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 15:56:40 +0000 (16:56 +0100)
The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/atm/ueagle-atm.c

index 5a459377574bcdc3436314ea17284fa1ad7ea3e9..888998a7fe314c4ee3f25298f2c81f0d429365c4 100644 (file)
@@ -952,7 +952,7 @@ static void uea_load_page_e1(struct work_struct *work)
        int i;
 
        /* reload firmware when reboot start and it's loaded already */
-       if (ovl == 0 && pageno == 0 && sc->dsp_firm) {
+       if (ovl == 0 && pageno == 0) {
                release_firmware(sc->dsp_firm);
                sc->dsp_firm = NULL;
        }
@@ -1074,7 +1074,7 @@ static void uea_load_page_e4(struct work_struct *work)
        uea_dbg(INS_TO_USBDEV(sc), "sending DSP page %u\n", pageno);
 
        /* reload firmware when reboot start and it's loaded already */
-       if (pageno == 0 && sc->dsp_firm) {
+       if (pageno == 0) {
                release_firmware(sc->dsp_firm);
                sc->dsp_firm = NULL;
        }