Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp557485yba; Fri, 12 Apr 2019 08:54:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK6eInb0nXDt6Kgf3hkGQaYbfN0XRvyhwjv9JlrdN9NEM99BoEMd0w9biCgEQBgnOr1KMu X-Received: by 2002:a17:902:9687:: with SMTP id n7mr16655221plp.105.1555084469656; Fri, 12 Apr 2019 08:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555084469; cv=none; d=google.com; s=arc-20160816; b=TLpzTp0y9t6vVZ1GUPrALyVyLY4QOiQlPFjLkOfsjfLYe2nfdH29rLpqxR7FC7SqYf FSqHGzR7X3gbTigkTnAw/7e3mXzVC78bn03+kyV9wyHSHfShqktM5kzQXdJJKu35/ezt Fbx1tJq4BmV8DR7GSWccWZr0fW2O2DmMT6JSbi/LeVH3lZYcTsPkYJTukHQhPv482WWf hlbvty2UoM+2wp1WNRXN317zyz1WJHDF9PzCz9ARO+VYk/MHVZsIOfwUTm1d6tkkdMLO LppjLQcM9FbPLiC6oj/h5olz8s/nstDtkHtGrKA261kNOnPyIFFs1GIY+8nseVcpzNH6 Pohg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=c6YfM1TS9TxoFzXbBpT7/cnbdvYQcVDLeQkFxKRRaOo=; b=yI5xsFP16taNCHM3QOmuauLPn4aK9oGhwM+d6ImqFKkXYb9U7alJrvvtMwktLExIHU gC35tbwbBnW3XIePqSNJhiyZ9Gpjnf5LH53EE8cMprrfoTCTgaRNCxQ56RBDy+BU+LGh XFoKnxR2Y/sU4o+RfSepAKDg971uSMg6MTwh+EbMA5hweQsA51CRpt4yfsbdjTgNhYeV KHLzHM/jsZB01ig3OPZb+knOjTwF2ZV5PyxmOR28X/A1qrAUkj4x3iuMqbUWpMfogjvy itiQ11yGsJQkQVIei3VK0QEWj2XNe5dPvGvtHYHvHEALvwC1vZy28hRRnmumqUnqI9U4 0OBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si22119637pgs.343.2019.04.12.08.54.13; Fri, 12 Apr 2019 08:54:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727122AbfDLPxc (ORCPT + 99 others); Fri, 12 Apr 2019 11:53:32 -0400 Received: from mga12.intel.com ([192.55.52.136]:29152 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfDLPxb (ORCPT ); Fri, 12 Apr 2019 11:53:31 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2019 08:53:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,341,1549958400"; d="scan'208";a="130871774" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 12 Apr 2019 08:53:28 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1hEyUZ-00073w-Ib; Fri, 12 Apr 2019 23:53:27 +0800 Date: Fri, 12 Apr 2019 23:52:43 +0800 From: kbuild test robot To: Nick Crews Cc: kbuild-all@01.org, enric.balletbo@collabora.com, bleung@chromium.org, sre@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dlaurie@chromium.org, lamzin@google.com, bartfab@google.com, derat@google.com, groeck@google.com, dtor@google.com, sjg@chromium.org, jchwong@chromium.org, Nick Crews Subject: [PATCH] power_supply: platform/chrome: wilco_ec: fix ptr_ret.cocci warnings Message-ID: <20190412155243.GA26871@lkp-ivb-ep02> References: <20190412002055.92529-2-ncrews@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412002055.92529-2-ncrews@chromium.org> X-Patchwork-Hint: ignore User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/platform/chrome/wilco_ec/charge_config.c:173: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: 08c1b2e2e50e ("power_supply: platform/chrome: wilco_ec: Add charging config driver") CC: Nick Crews Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Nick-Crews/power_supply-Add-more-charge-types-and-CHARGE_CONTROL_-properties/20190412-211253 charge_config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/platform/chrome/wilco_ec/charge_config.c +++ b/drivers/platform/chrome/wilco_ec/charge_config.c @@ -170,10 +170,7 @@ static int wilco_charge_probe(struct pla psy_cfg.drv_data = ec; psy = devm_power_supply_register(&pdev->dev, &wilco_ps_desc, &psy_cfg); - if (IS_ERR(psy)) - return PTR_ERR(psy); - - return 0; + return PTR_ERR_OR_ZERO(psy); } static struct platform_driver wilco_charge_driver = {