From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbaLSJqx (ORCPT ); Fri, 19 Dec 2014 04:46:53 -0500 Received: from mga01.intel.com ([192.55.52.88]:2512 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbaLSJqv (ORCPT ); Fri, 19 Dec 2014 04:46:51 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,605,1413270000"; d="scan'208";a="650396196" Date: Fri, 19 Dec 2014 17:45:27 +0800 From: kbuild test robot To: Alan Tull Cc: kbuild-all@01.org, Michal Simek , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: fpga manager: fix odd_ptr_err.cocci warnings Message-ID: <20141219094527.GA99450@athens> References: <201412191721.MzCPy2f4%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412191721.MzCPy2f4%fengguang.wu@intel.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/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 Signed-off-by: Fengguang Wu --- 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)