|
@@ -203,8 +203,10 @@ static int rsi_load_ta_instructions(struct rsi_common *common)
|
|
|
|
|
|
/* Copy firmware into DMA-accessible memory */
|
|
|
fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
|
|
|
- if (!fw)
|
|
|
- return -ENOMEM;
|
|
|
+ if (!fw) {
|
|
|
+ status = -ENOMEM;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
len = fw_entry->size;
|
|
|
|
|
|
if (len % 4)
|
|
@@ -217,6 +219,8 @@ static int rsi_load_ta_instructions(struct rsi_common *common)
|
|
|
|
|
|
status = rsi_copy_to_card(common, fw, len, num_blocks);
|
|
|
kfree(fw);
|
|
|
+
|
|
|
+out:
|
|
|
release_firmware(fw_entry);
|
|
|
return status;
|
|
|
}
|