Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1427543 > unrolled thread

[PATCH] net: ethernet: fix odd_ptr_err.cocci warnings

Started byJulia Lawall <julia.lawall@lip6.fr>
First post2016-06-21 12:10 +0200
Last post2016-06-21 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] net: ethernet: fix odd_ptr_err.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 12:10 +0200

#1427543 — [PATCH] net: ethernet: fix odd_ptr_err.cocci warnings

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-06-21 12:10 +0200
Subject[PATCH] net: ethernet: fix odd_ptr_err.cocci warnings
Message-ID<rMqN4-4mp-49@gated-at.bofh.it>
PTR_ERR should normally access the value just tested by IS_ERR

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

CC: Tien Hock Loh <thloh@altera.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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(-)

--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -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);
 			}
 		}
 	}

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web