staging: slicoss: return early before calling request_firmware with empty firmware...
authorDevendra Naga <devendra.aaru@gmail.com>
Sun, 26 Aug 2012 07:06:56 +0000 (12:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 21:23:33 +0000 (14:23 -0700)
when the device id doesn't match in slic_card_download_gbrcv the filename is "",
i.e an empty name, and we try calling request_firmware with that name,
actually we can just fail out at default case before even calling request_firmware

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index 56829fc032ff496421773d129e80be7bd6d4b078..eb498b894914291c5937586356375f01053c7e0a 100644 (file)
@@ -514,8 +514,7 @@ static int slic_card_download_gbrcv(struct adapter *adapter)
                file = "slicoss/gbrcvucode.sys";
                break;
        default:
-               ASSERT(0);
-               break;
+               return -ENOENT;
        }
 
        ret = request_firmware(&fw, file, &adapter->pcidev->dev);