Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2110609imu; Sat, 10 Nov 2018 07:59:05 -0800 (PST) X-Google-Smtp-Source: AJdET5eFwPbg7/58GzcbuiVu/VuHQ75vkD+OkOolBxsUiYbIzbU3ofF/YGudlwCHLRJPnY/uGGG7 X-Received: by 2002:a65:5a05:: with SMTP id y5-v6mr11337550pgs.161.1541865545117; Sat, 10 Nov 2018 07:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541865545; cv=none; d=google.com; s=arc-20160816; b=RWQ/oGPX5LkLcrvSVjFfIHgkBYgu+Sy3wgKhr5+btjtQfs7aF+tCQh9CoRd5sizLD2 ITdyzV+m9LvJmx6aBlb64FPWnEbSLBSe3obfieoI8GR330//bxOSlvlfHWg9LR4yoiK8 cCTIDAsZmvwt0Imv97gfpr22FlrW75rr+kWy5Plh0GYDaxash3D3D3Pl746tCeL4yF8E Sb2Sq9rB+4HPDXCwy+UMLtUOV5yGilDcaJUlrWA5i0bEIxlLGV7956GzT78EdfY0kzpb op1qvU4pXf5+7JQG0FlE3HDoooPhHmO+/loF5M/y0UHSHtDCehCothkeEJJ1IMoePBIG DgIw== 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=V15WIxIKTE5aOsE4tknzth9ZMk1A4a5PrKM3q3jaq4s=; b=fC+LgnP3pSzeEnfDvLv5h9BzRbJLjnittTzFAR/1m7FS5qFCtPQWIqVUh/y+aCS/BX CiVXAIB7tH4D7O3gmuy8QGE0ntrJC7yXLE7K6Y5bTlltifPdVlggBoLgkIvXHcjj1nMd vP0Qxlor1tSPJvb1r2N8pIekmcfpr9caeeykGxJZmYORtNLHNl62O/TGMyr7prMjf9RZ DMuej0yqEeGlgE5egR1Du98ZV7lkqQO6Peq+X3tf426vFO99V5odnbMQywV3ct3Xjvox 0zVf6yWUkLMq58h7vJiqfo1Uy6glgUcL67o89mri1X4JOjR8CHhf4E/vbcXMV2EfOcWE eR4Q== 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 w20-v6si10889511plp.260.2018.11.10.07.58.50; Sat, 10 Nov 2018 07:59:05 -0800 (PST) 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 S1726777AbeKKBnj (ORCPT + 99 others); Sat, 10 Nov 2018 20:43:39 -0500 Received: from mga14.intel.com ([192.55.52.115]:8178 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbeKKBnj (ORCPT ); Sat, 10 Nov 2018 20:43:39 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2018 07:58:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,488,1534834800"; d="scan'208";a="280004410" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by fmsmga006.fm.intel.com with ESMTP; 10 Nov 2018 07:58:09 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1gLVeD-0007NT-Di; Sat, 10 Nov 2018 23:58:09 +0800 Date: Sat, 10 Nov 2018 23:57:20 +0800 From: kbuild test robot To: zoro Cc: kbuild-all@01.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, zoro Subject: [PATCH] rtc: sd3078: fix ptr_ret.cocci warnings Message-ID: <20181110155720.GA122918@ivb43> References: <1541839433-28811-2-git-send-email-long17.cool@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1541839433-28811-2-git-send-email-long17.cool@163.com> 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/rtc/rtc-sd3078.c:248: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: e231edadd7fa ("rtc: sd3078: new driver.") CC: zoro Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/zoro/dt-bindings-define-vendor-prefix-for-whwave-Inc/20181110-205048 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next rtc-sd3078.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/rtc/rtc-sd3078.c +++ b/drivers/rtc/rtc-sd3078.c @@ -245,10 +245,7 @@ static int sd3078_probe(struct i2c_clien sd3078_driver.driver.name, &sd3078_rtc_ops, THIS_MODULE); - if (IS_ERR(sd3078->rtc)) - return PTR_ERR(sd3078->rtc); - - return 0; + return PTR_ERR_OR_ZERO(sd3078->rtc); } static int sd3078_remove(struct i2c_client *client)