[PATCH 1/1] qed: do not use unitialized variable
From: Heinrich Schuchardt
Date: Sun Jul 31 2016 - 07:25:12 EST
Do not write random bytes from the kernel stack when
calling qed_wr.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
---
drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index b26fe26..151cbf9 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -888,7 +888,7 @@ static int qed_hw_init_pf(struct qed_hwfn *p_hwfn,
if (hw_mode & (1 << MODE_MF_SI)) {
u8 pf_id = 0;
- u32 val;
+ u32 val = 0;
if (!qed_hw_init_first_eth(p_hwfn, p_ptt, &pf_id)) {
if (p_hwfn->rel_pf_id == pf_id) {
--
2.8.1