Skip to contentSkip to conversation

net: ethernet: fix odd_ptr_err.cocci warnings

PATCH In review Julia Lawall 2 participants 2 messages Jun 21, 2016 – Jun 23, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: fix odd_ptr_err.cocci warnings

PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

---

This patch refers to the following code:

url:
https://github.com/0day-ci/linux/commits/thloh-altera-com/net-ethernet-Add-T
SE-PCS-support-to-dwmac-socfpga/20160621-164854

 dwmac-socfpga.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +1 -1
@@ -224,7 +224,7 @@ static int socfpga_dwmac_parse_data(stru
 				dev_err(dev,
 					"%s: ERROR: failed mapping tse control port\n",
 					__func__);
-				return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
+				return PTR_ERR(dwmac->pcs.tse_pcs_base);
 			}
 		}
 	}