Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp613852ybl; Fri, 30 Aug 2019 04:45:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+sAPNbQ5gm5D56B5gedgl6wgG2qA+eZaqEB5YkNkFaktVY6H8IZq9aKx4zGbJG+rJmVWN X-Received: by 2002:a63:3ec7:: with SMTP id l190mr13040631pga.334.1567165530911; Fri, 30 Aug 2019 04:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567165530; cv=none; d=google.com; s=arc-20160816; b=yC1AHWrZRIOSnC+S5s3u3gBZky81OlGWuekUB2qiqURGpWR7rCH5UJuTVB1yOwWvsD yz+Q0s/h0AG0I9t26u/LEtsiBd0Fa1CqWGIHNollcJBWIUsjLOwvcd6LGcZ/hTXYtyTo 09kfayOe2imDySLDCc5mQMfK9yDD8LFjSKygTivFhGfWzIIMx1TcfxFEbQ0sx1E0IgEG QTnBAlPXwTT6qoErQPkZbysc/tNAYk/flhGKxxb5gcGS9hNHkBMbr1Z7u398b+TmZ+J6 jrsms0w1/LLJOySzK6tZ+olWvgx95VgxWB+v05B7vhTLUe3TFSVc1SPaRvlHIPKp0uXU qidA== 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=74U5of4WSNDFamepRlIQwrOik2hmT/etdB4ZBXa0NDk=; b=bgO1kmoABeobYAs0sTQj8zTtuOyBYVIxVdyoNIRkX8/KENz+Fbzy+SogfeqxNy7E7K UY89ia9zzTztjdceMsc6QGDU9BySBn7ldg+YXRLIogGftEiUdhd7y1oVLpzAvvAmDKCz C549mrBZzs8gHpvCYI+zIuDHj9otvqGz6aZlq1mXXG1T/fTfJdsPLGrW3Azg2eInp8fN x3xZwRSTeB0NLJFO/Y1HUlFAZoMuTst/IBhgLOquePbgJrK6/5E9fXayi0VlCxvCGoq7 lf72syy1ohZ91z7x46CD0sk7EcKWlquwUNVnrDNr+hTMAQBijDuKrOIISFNxv4fe9zgk qThA== 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 k30si1024054pgb.431.2019.08.30.04.45.14; Fri, 30 Aug 2019 04:45:30 -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 S1728076AbfH3LoQ (ORCPT + 99 others); Fri, 30 Aug 2019 07:44:16 -0400 Received: from mga11.intel.com ([192.55.52.93]:59539 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbfH3LoO (ORCPT ); Fri, 30 Aug 2019 07:44:14 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2019 04:44:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,447,1559545200"; d="scan'208";a="175586857" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 30 Aug 2019 04:44:12 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1i3fK8-000EEF-80; Fri, 30 Aug 2019 19:44:12 +0800 Date: Fri, 30 Aug 2019 19:43:19 +0800 From: kbuild test robot To: Thomas Bogendoerfer Cc: kbuild-all@01.org, Greg Kroah-Hartman , Evgeniy Polyakov , linux-kernel@vger.kernel.org Subject: [PATCH] w1: fix ptr_ret.cocci warnings Message-ID: <20190830114319.2iql3iglqswv3pge@48261080c7f1> References: <20190829161317.10618-3-tbogendoerfer@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829161317.10618-3-tbogendoerfer@suse.de> X-Patchwork-Hint: ignore User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/w1/slaves/w1_ds250x.c:215: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: d835b3166dd6 ("w1: add DS2501, DS2502, DS2505 EPROM device driver") CC: Thomas Bogendoerfer Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/w1-add-1-wire-master-driver-for-IP-block-found-in-SGI-ASICs/20190830-122322 w1_ds250x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/w1/slaves/w1_ds250x.c +++ b/drivers/w1/slaves/w1_ds250x.c @@ -212,10 +212,7 @@ static int w1_eprom_add_slave(struct w1_ nvmem_cfg.size = data->size; nvmem = devm_nvmem_register(&sl->dev, &nvmem_cfg); - if (IS_ERR(nvmem)) - return PTR_ERR(nvmem); - - return 0; + return PTR_ERR_OR_ZERO(nvmem); } static struct w1_family_ops w1_eprom_fops = {