Skip to content

Commit 15f1bb1

Browse files
Shahed Shaikhdavem330
authored andcommitted
qlcnic: Fix corruption while copying
Use proper typecasting while performing byte-by-byte copy Signed-off-by: Shahed Shaikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f4eaed2 commit 15f1bb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
14151415
if (fw->size & 0xF) {
14161416
addr = dest + size;
14171417
for (i = 0; i < (fw->size & 0xF); i++)
1418-
data[i] = temp[size + i];
1418+
data[i] = ((u8 *)temp)[size + i];
14191419
for (; i < 16; i++)
14201420
data[i] = 0;
14211421
ret = qlcnic_ms_mem_write128(adapter, addr,

0 commit comments

Comments
 (0)