Skip to content

Commit aa4ad88

Browse files
Mintz, Yuvaldavem330
authored andcommitted
qed: Fix uninitialized data in aRFS infrastructure
Current memset is using incorrect type of variable, causing the upper-half of the strucutre to be left uninitialized and causing: ethernet/qlogic/qed/qed_init_fw_funcs.c: In function 'qed_set_rfs_mode_disable': ethernet/qlogic/qed/qed_init_fw_funcs.c:993:3: error: '*((void *)&ramline+4)' is used uninitialized in this function [-Werror=uninitialized] Fixes: d51e4af ("qed: aRFS infrastructure support") Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Yuval Mintz <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8c977f5 commit aa4ad88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ void qed_set_rfs_mode_disable(struct qed_hwfn *p_hwfn,
983983
memset(&camline, 0, sizeof(union gft_cam_line_union));
984984
qed_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id,
985985
camline.cam_line_mapped.camline);
986-
memset(&ramline, 0, sizeof(union gft_cam_line_union));
986+
memset(&ramline, 0, sizeof(ramline));
987987

988988
for (i = 0; i < RAM_LINE_SIZE / REG_SIZE; i++) {
989989
u32 hw_addr = PRS_REG_GFT_PROFILE_MASK_RAM;

0 commit comments

Comments
 (0)