From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933826AbbLGP06 (ORCPT ); Mon, 7 Dec 2015 10:26:58 -0500 Received: from mga11.intel.com ([192.55.52.93]:39651 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932746AbbLGP0x (ORCPT ); Mon, 7 Dec 2015 10:26:53 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,395,1444719600"; d="scan'208";a="701838544" Date: Mon, 7 Dec 2015 23:25:21 +0800 From: kbuild test robot To: Cyrille Pitchen 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 Subject: [PATCH] mtd: atmel-quadspi: fix odd_ptr_err.cocci warnings Message-ID: <20151207152521.GA137768@lkp-hsx03> References: <201512072340.a1OuJD0t%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32396dbdec3df0bc21062a46447f02ad348c47f0.1449494420.git.cyrille.pitchen@atmel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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;