Skip to content

Commit

Permalink
staging: slicoss: release firmware before returning
Browse files Browse the repository at this point in the history
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: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent 651d4bc commit 7ee34ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/staging/slicoss/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,16 @@ static int slic_card_download_gbrcv(struct adapter *adapter)
index += 4;
switch (adapter->devid) {
case SLIC_2GB_DEVICE_ID:
if (rcvucodelen != OasisRcvUCodeLen)
if (rcvucodelen != OasisRcvUCodeLen) {
release_firmware(fw);
return -EINVAL;
}
break;
case SLIC_1GB_DEVICE_ID:
if (rcvucodelen != GBRcvUCodeLen)
if (rcvucodelen != GBRcvUCodeLen) {
release_firmware(fw);
return -EINVAL;
}
break;
default:
ASSERT(0);
Expand Down

0 comments on commit 7ee34ab

Please sign in to comment.