summaryrefslogtreecommitdiff
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-08-26 07:06:56 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 21:23:33 (GMT)
commit651d4bc7ed85356efa16465073f13a24f040369e (patch)
tree647ecff33e049388e289c98f8d1b5a1bddc090da /drivers/staging/slicoss
parent623c2bb2c59a6941c68e5d47d13e417f63535043 (diff)
downloadlinux-fsl-qoriq-651d4bc7ed85356efa16465073f13a24f040369e.tar.xz
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 <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 56829fc..eb498b8 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);