Commit 7ee34ab2 authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman

staging: slicoss: release firmware before returning

we request_firmware in slic_card_download_gbrcv and we return out
with out calling release_firmware, where we compare against a
firmware lengths of certain device ids.
Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 651d4bc7
...@@ -528,12 +528,16 @@ static int slic_card_download_gbrcv(struct adapter *adapter) ...@@ -528,12 +528,16 @@ static int slic_card_download_gbrcv(struct adapter *adapter)
index += 4; index += 4;
switch (adapter->devid) { switch (adapter->devid) {
case SLIC_2GB_DEVICE_ID: case SLIC_2GB_DEVICE_ID:
if (rcvucodelen != OasisRcvUCodeLen) if (rcvucodelen != OasisRcvUCodeLen) {
release_firmware(fw);
return -EINVAL; return -EINVAL;
}
break; break;
case SLIC_1GB_DEVICE_ID: case SLIC_1GB_DEVICE_ID:
if (rcvucodelen != GBRcvUCodeLen) if (rcvucodelen != GBRcvUCodeLen) {
release_firmware(fw);
return -EINVAL; return -EINVAL;
}
break; break;
default: default:
ASSERT(0); ASSERT(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment