Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp102527yba; Fri, 19 Apr 2019 21:37:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFBkuAF/2K8yIMDyeeF8uXmNcjF0tIp33ilZEvSJMQFZkuwKk/1rA0GIjm+xHI9uy0/yEl X-Received: by 2002:a17:902:d83:: with SMTP id 3mr7908396plv.125.1555735070482; Fri, 19 Apr 2019 21:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555735070; cv=none; d=google.com; s=arc-20160816; b=JEIsZ3zAr/EHDwHVTplO4wDFBqkbJ5iopT8l4GRC058qaneuAhv6+3PxEqtGIumnM/ ibSit5Zr74SPmZF47Tj6IJkOCGRB1/MWyJI/y8GoId1kFi8uZzlvPoJhTldBT5FwC6U2 p27ov++zVjofMI2iAKtZ15wPR8yfu4d6neMrWlcY81d+f1mBwgPI/QjhN4VF/Cj9LhMr KFcSBwCQyct/ZgLxHtxjYulMxPyFAe7W3Iz4BHCvZb+GTBWlZtxygr2ByfFNkh78h+Re 5ZeX7R2DkhfRmdEjCew4yxEUm7NP3q+RcO0sB/zHHvT/USTCbm9bvnfY/ZDchbl2wlrM Pe6A== 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=7AbJVqlUkA7+jt3zypqET5Lyuz3gQMI88NihExjFn70=; b=VsJSaS1scf7PLltwHJVpkUJ9BpEuioJLlpyHHJU87yG5YNcoqKhNkurlVTJ63pJKKg hFRCqRXP2YLHltR+RXW+NXewNkCM2yojec+j9siFvi0G8loNC2Y53V4Vsyufl7naViv9 tOxbPJo/mr2x9NffWbXj3tMDo0vauM3/lNzHB8atDBg8nw3CeveYV314i+i6ymrN2FxU BdxeKNciXkJkG5lHNVf67ZGbGK3Z20HPB2OyR4uzn950VwL2ARtbBooY4UCHs38ItXe0 1KCsqfTbg7zyrbeXShusKFLvJmncg94XC6oclJaPeDQ/1gioLIJjucuMLFG0t6ZQqF3U gdvA== 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 y11si6775677plr.384.2019.04.19.21.37.02; Fri, 19 Apr 2019 21:37:50 -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 S1726089AbfDTEak (ORCPT + 99 others); Sat, 20 Apr 2019 00:30:40 -0400 Received: from mga12.intel.com ([192.55.52.136]:31804 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbfDTEak (ORCPT ); Sat, 20 Apr 2019 00:30:40 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 21:30:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,372,1549958400"; d="scan'208";a="144361617" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 19 Apr 2019 21:30:38 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1hHhe9-000H68-Hg; Sat, 20 Apr 2019 12:30:37 +0800 Date: Sat, 20 Apr 2019 12:30:16 +0800 From: kbuild test robot To: Nick Crews Cc: kbuild-all@01.org, 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, 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: <20190420043016.GA4464@lkp-kbuild13> References: <20190418233838.149545-1-ncrews@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190418233838.149545-1-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/power/supply/wilco-charger.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: 2600e89ec94e ("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-platform-chrome-wilco_ec-Add-charging-config-driver/20190420-041913 wilco-charger.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/power/supply/wilco-charger.c +++ b/drivers/power/supply/wilco-charger.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 = {