From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19DEDC433E0 for ; Mon, 8 Jun 2020 01:03:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEF4B20820 for ; Mon, 8 Jun 2020 01:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728667AbgFHBDJ (ORCPT ); Sun, 7 Jun 2020 21:03:09 -0400 Received: from mga18.intel.com ([134.134.136.126]:16737 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728201AbgFHBDI (ORCPT ); Sun, 7 Jun 2020 21:03:08 -0400 IronPort-SDR: HcNfMVTOebycw0s019Z+58zzLHXiT8KyNhN7UELxsI86X19bSoc6f8ZnYVWldOmVJyM8l2aTTl lPFZ3YScJuqA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2020 18:03:07 -0700 IronPort-SDR: eMTeIwwYNjJ8V4Higex8aVbxDSVYxFYlfD6Rr12pxhhoZHpEPkyr3ZE/QwTPDJIz/BkxGVIxRp 1YYmTNgcZbGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,486,1583222400"; d="scan'208";a="305664436" Received: from lkp-server01.sh.intel.com (HELO 3b764b36c89c) ([10.239.97.150]) by fmsmga002.fm.intel.com with ESMTP; 07 Jun 2020 18:03:06 -0700 Received: from kbuild by 3b764b36c89c with local (Exim 4.92) (envelope-from ) id 1ji6Bt-0000Wj-DE; Mon, 08 Jun 2020 01:03:05 +0000 Date: Mon, 8 Jun 2020 09:02:53 +0800 From: kernel test robot To: Andy Shevchenko Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org Subject: [PATCH] pinctrl: mcp23s08: Split to three parts: fix ptr_ret.cocci warnings Message-ID: <20200608010253.GA79576@44f7ab9e8d59> References: <202006080944.vTmpp64f%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202006080944.vTmpp64f%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kernel test robot drivers/pinctrl/pinctrl-mcp23s08_spi.c:129:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 0f04a81784fe ("pinctrl: mcp23s08: Split to three parts: core, I²C, SPI") CC: Andy Shevchenko Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: cf0c97f148e9e50aa5a7ddd1984a604dd2bde4af commit: 0f04a81784fe3ddc00cae74c517265b3ddb8825c pinctrl: mcp23s08: Split to three parts: core, I²C, SPI pinctrl-mcp23s08_spi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/pinctrl/pinctrl-mcp23s08_spi.c +++ b/drivers/pinctrl/pinctrl-mcp23s08_spi.c @@ -126,10 +126,7 @@ static int mcp23s08_spi_regmap_init(stru copy->name = name; mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy); - if (IS_ERR(mcp->regmap)) - return PTR_ERR(mcp->regmap); - - return 0; + return PTR_ERR_OR_ZERO(mcp->regmap); } static int mcp23s08_probe(struct spi_device *spi)