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


Groups > linux.kernel > #1285593

[PATCH] mtd: atmel-quadspi: fix odd_ptr_err.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] mtd: atmel-quadspi: fix odd_ptr_err.cocci warnings
Date 2015-12-07 16:30 +0100
Message-ID <qD5TI-6js-37@gated-at.bofh.it> (permalink)
References <qD5TI-6js-33@gated-at.bofh.it> <qD4NZ-5Bp-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


drivers/mtd/spi-nor/atmel-quadspi.c:758:5-11: inconsistent IS_ERR and PTR_ERR on line 760.

 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 to
 IS_ERR that is wrong.

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

CC: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

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

--- a/drivers/mtd/spi-nor/atmel-quadspi.c
+++ b/drivers/mtd/spi-nor/atmel-quadspi.c
@@ -757,7 +757,7 @@ static int atmel_qspi_probe(struct platf
 	aq->mem = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(aq->mem)) {
 		dev_err(&pdev->dev, "missing AHB memory\n");
-		err = PTR_ERR(aq->regs);
+		err = PTR_ERR(aq->mem);
 		goto exit;
 	}
 	aq->phys_addr = (dma_addr_t)res->start;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI controller Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-07 15:10 +0100
  [PATCH linux-next 3/5] mtd: m25p80: add support of dual and quad spi protocols to all commands Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-07 15:20 +0100
  [PATCH linux-next 5/5] mtd: atmel-quadspi: add driver for Atmel QSPI controller Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-07 15:20 +0100
    [PATCH] mtd: atmel-quadspi: fix odd_ptr_err.cocci warnings kbuild test robot <lkp@intel.com> - 2015-12-07 16:30 +0100
    [PATCH] mtd: atmel-quadspi: fix compare_const_fl.cocci warnings kbuild test robot <lkp@intel.com> - 2015-12-07 16:30 +0100
    Re: [PATCH linux-next 5/5] mtd: atmel-quadspi: add driver for Atmel  QSPI controller Nicolas Ferre <nicolas.ferre@atmel.com> - 2015-12-11 16:00 +0100
  [PATCH linux-next 4/5] Documentation: atmel-quadspi: add binding file for Atmel QSPI driver Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-07 15:20 +0100
    Re: [PATCH linux-next 4/5] Documentation: atmel-quadspi: add binding  file for Atmel QSPI driver Rob Herring <robh@kernel.org> - 2015-12-09 04:20 +0100
    Re: [PATCH linux-next 4/5] Documentation: atmel-quadspi: add binding  file for Atmel QSPI driver Nicolas Ferre <nicolas.ferre@atmel.com> - 2015-12-11 10:30 +0100
  Re: [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI  controller Brian Norris <computersforpeace@gmail.com> - 2015-12-07 20:40 +0100
    RE: [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI  controller Bean Huo 霍斌斌 (beanhuo)   <beanhuo@micron.com> - 2015-12-08 07:30 +0100
    RE: [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI  controller Bean Huo 霍斌斌 (beanhuo)   <beanhuo@micron.com> - 2015-12-08 07:50 +0100
    Re: [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI  controller Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-08 11:30 +0100
      Re: [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI  controller Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-12-08 15:40 +0100

csiph-web