public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fpga manager: fix odd_ptr_err.cocci warnings
       [not found] <201412191721.MzCPy2f4%fengguang.wu@intel.com>
@ 2014-12-19  9:45 ` kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2014-12-19  9:45 UTC (permalink / raw)
  To: Alan Tull
  Cc: kbuild-all, Michal Simek, Greg Kroah-Hartman, devel, linux-kernel

drivers/staging/fpga/socfpga.c:647:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 648

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call
 IS_ERR that is wrong.

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

CC: Alan Tull <atull@opensource.altera.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 socfpga.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/fpga/socfpga.c
+++ b/drivers/staging/fpga/socfpga.c
@@ -645,7 +645,7 @@ static int socfpga_fpga_probe(struct pla
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	priv->fpga_data_addr = devm_ioremap_resource(dev, res);
 	if (IS_ERR(priv->fpga_data_addr))
-		return PTR_ERR(priv->fpga_base_addr);
+		return PTR_ERR(priv->fpga_data_addr);
 
 	priv->irq = platform_get_irq(pdev, 0);
 	if (priv->irq < 0)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-19  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201412191721.MzCPy2f4%fengguang.wu@intel.com>
2014-12-19  9:45 ` [PATCH] staging: fpga manager: fix odd_ptr_err.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox