Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359449
b: refs/heads/master
c: 02db3db
h: refs/heads/master
i:
  359447: ac96094
v: v3
  • Loading branch information
Jesper Juhl authored and James Bottomley committed Jan 29, 2013
1 parent f4e6fae commit b7b5ddb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b82d825a5fc94c79e7d2a7c54b0cb2d22817cc0
refs/heads/master: 02db3db5aaa1154a748a7cba93e9f0098ad62f78
15 changes: 9 additions & 6 deletions trunk/drivers/scsi/csiostor/csio_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,13 +2131,16 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path)
value_to_add = 4 - (cf->size % 4);

cfg_data = kzalloc(cf->size+value_to_add, GFP_KERNEL);
if (cfg_data == NULL)
return -ENOMEM;
if (cfg_data == NULL) {
ret = -ENOMEM;
goto leave;
}

memcpy((void *)cfg_data, (const void *)cf->data, cf->size);

if (csio_hw_check_fwconfig(hw, fw_cfg_param) != 0)
return -EINVAL;
if (csio_hw_check_fwconfig(hw, fw_cfg_param) != 0) {
ret = -EINVAL;
goto leave;
}

mtype = FW_PARAMS_PARAM_Y_GET(*fw_cfg_param);
maddr = FW_PARAMS_PARAM_Z_GET(*fw_cfg_param) << 16;
Expand All @@ -2149,9 +2152,9 @@ csio_hw_flash_config(struct csio_hw *hw, u32 *fw_cfg_param, char *path)
strncpy(path, "/lib/firmware/" CSIO_CF_FNAME, 64);
}

leave:
kfree(cfg_data);
release_firmware(cf);

return ret;
}

Expand Down

0 comments on commit b7b5ddb

Please sign in to comment.