[dpdk-dev] [PATCH 32/70] net/e1000/base: modify the wrong return value

Guinan Sun guinanx.sun at intel.com
Mon Jun 22 08:45:56 CEST 2020


Make 'init_phy_hw_reset_generic' method to be closest to the
upstream method. Fix the return value to be same as in upstream.
Fix unable to handle kernel NULL pointer dereference at 0x0 caused
to kernel panic.

Signed-off-by: Sasha Neftin <sasha.neftin at intel.com>
Signed-off-by: Guinan Sun <guinanx.sun at intel.com>
---
 drivers/net/e1000/base/e1000_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 73e2ecda8..bcb3df2f3 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -2905,7 +2905,7 @@ s32 e1000_phy_hw_reset_generic(struct e1000_hw *hw)
 
 	phy->ops.release(hw);
 
-	return phy->ops.get_cfg_done(hw);
+	return ret_val;
 }
 
 /**
-- 
2.17.1



More information about the dev mailing list