summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShahed Shaikh <shahed.shaikh@qlogic.com>2015-07-29 07:55:35 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-29 23:57:26 -0700
commit15f1bb1f1e067be7088ed43ef23d59629bd24348 (patch)
tree59cdd79fe2da1624c2cdf6036b514cf935b3521e /drivers
parentf4eaed28c7834fc049c754f63e6988bbd73778d9 (diff)
qlcnic: Fix corruption while copying
Use proper typecasting while performing byte-by-byte copy Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index 33669c29b341..753ea8bad953 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -1415,7 +1415,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
if (fw->size & 0xF) {
addr = dest + size;
for (i = 0; i < (fw->size & 0xF); i++)
- data[i] = temp[size + i];
+ data[i] = ((u8 *)temp)[size + i];
for (; i < 16; i++)
data[i] = 0;
ret = qlcnic_ms_mem_write128(adapter, addr,