diff options
author | Shahed Shaikh <shahed.shaikh@qlogic.com> | 2015-07-29 07:55:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-29 23:57:26 -0700 |
commit | 15f1bb1f1e067be7088ed43ef23d59629bd24348 (patch) | |
tree | 59cdd79fe2da1624c2cdf6036b514cf935b3521e /drivers/net/ethernet | |
parent | f4eaed28c7834fc049c754f63e6988bbd73778d9 (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/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 |
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, |