From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, computersforpeace@gmail.com,
linux-mtd@lists.infradead.org, nicolas.ferre@atmel.com,
marex@denx.de, vigneshr@ti.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
Cyrille Pitchen <cyrille.pitchen@atmel.com>
Subject: [PATCH] mtd: atmel-quadspi: fix odd_ptr_err.cocci warnings
Date: Mon, 7 Dec 2015 23:25:21 +0800 [thread overview]
Message-ID: <20151207152521.GA137768@lkp-hsx03> (raw)
In-Reply-To: <32396dbdec3df0bc21062a46447f02ad348c47f0.1449494420.git.cyrille.pitchen@atmel.com>
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;
next prev parent reply other threads:[~2015-12-07 15:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 14:09 [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI controller Cyrille Pitchen
2015-12-07 14:09 ` [PATCH linux-next 1/5] mtd: spi-nor: properly detect the memory when it boots in Quad or Dual mode Cyrille Pitchen
2015-12-18 1:55 ` Brian Norris
[not found] ` <20151218015544.GG10460-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-12-18 11:19 ` Cyrille Pitchen
2016-01-04 16:50 ` Cyrille Pitchen
[not found] ` <813edd1addf9a09b9f01031d3cb279c8cdfe97bb.1449494420.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-12-18 2:08 ` Brian Norris
2015-12-07 14:09 ` [PATCH linux-next 2/5] mtd: spi-nor: fix Quad SPI mode support for Spansion, Micron and Macronix Cyrille Pitchen
[not found] ` <7f2a084da433f1936a1305dfa30327bc5abc802c.1449494420.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-12-18 2:18 ` Brian Norris
[not found] ` <20151218021857.GI10460-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2016-01-04 16:12 ` Cyrille Pitchen
2015-12-07 14:09 ` [PATCH linux-next 3/5] mtd: m25p80: add support of dual and quad spi protocols to all commands Cyrille Pitchen
[not found] ` <cover.1449494420.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-12-07 14:09 ` [PATCH linux-next 4/5] Documentation: atmel-quadspi: add binding file for Atmel QSPI driver Cyrille Pitchen
2015-12-09 3:16 ` Rob Herring
2015-12-11 9:26 ` Nicolas Ferre
2015-12-07 19:34 ` [PATCH linux-next 0/5] mtd: spi-nor: add driver for Atmel QSPI controller Brian Norris
2015-12-08 6:21 ` Bean Huo 霍斌斌 (beanhuo)
[not found] ` <A765B125120D1346A63912DDE6D8B6310BF53437-xjs9rfTec9KBtk7LW/CC8tTcztV8WXajQQ4Iyu8u01E@public.gmane.org>
2015-12-18 0:29 ` Brian Norris
[not found] ` <20151218002901.GE10460-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-12-18 0:41 ` Brian Norris
2016-01-20 3:41 ` Bean Huo 霍斌斌 (beanhuo)
2015-12-08 6:44 ` Bean Huo 霍斌斌 (beanhuo)
2015-12-08 10:25 ` Cyrille Pitchen
[not found] ` <5666B01B.9040707-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-12-08 14:32 ` Cyrille Pitchen
2015-12-07 14:09 ` [PATCH linux-next 5/5] mtd: atmel-quadspi: " Cyrille Pitchen
2015-12-07 15:25 ` kbuild test robot [this message]
2015-12-07 15:25 ` kbuild test robot
[not found] ` <32396dbdec3df0bc21062a46447f02ad348c47f0.1449494420.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-12-07 15:25 ` [PATCH] mtd: atmel-quadspi: fix compare_const_fl.cocci warnings kbuild test robot
2015-12-11 14:50 ` [PATCH linux-next 5/5] mtd: atmel-quadspi: add driver for Atmel QSPI controller Nicolas Ferre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151207152521.GA137768@lkp-hsx03 \
--to=lkp@intel.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).