From: Devendra Naga Date: Sun, 26 Aug 2012 07:06:56 +0000 (+0530) Subject: staging: slicoss: return early before calling request_firmware with empty firmware... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=651d4bc7ed85356efa16465073f13a24f040369e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: slicoss: return early before calling request_firmware with empty firmware filename 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 56829fc032ff..eb498b894914 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -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);