Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1475456ybi; Sat, 25 May 2019 02:54:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6MZ23jrz2uy5jEsehZapYJlCnLcsVTWcH5LMV5SjYYEzhYy+d1rmngwoW6/rpSVlUhtLb X-Received: by 2002:a17:902:b407:: with SMTP id x7mr112760584plr.28.1558778088837; Sat, 25 May 2019 02:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558778088; cv=none; d=google.com; s=arc-20160816; b=u8Bdr/PpVY5yrksS3lFeIIHBUgcC74ApO7O3ZfXKRSFeTUcQu3KJNNgQSBHLFxFZU5 GqWmVOV3AFgkBMtYwMgUxyEcf8X8AqcjUYxlY0odNWqdWXgxQf+BRnG3z5kuC7UbVwKy r7KXVi1MN9cT3f3IvBldciA4yRMyDZPkgLdGNBClnzJn1BKMWBZm9UhRLDp93onlETod M9e56ek5Z/j35HNVDxhZtvUoLgbXpK2wQy0F5sa0oYghzT56LzDUw+Xy/V3l8Gz8khpv aaatQI4XI/WjmDJZwXpFuMANO7QEOLK91BaPKXzoeOeatoBgqlLzm4B2uflVM1kJ9Lx/ HKpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=NA52AjQwrBf0703k7sbVMul5zk1FYHOy+jnznCOJXL8=; b=rJ2DTFY6xlEwE12sJYQKJN/IhvwJ2BmDlF7Hl9KYVcvLStgXBzwKU80dWH78B5uyqf yA6BOHbH9p4oLoIPIH+7Z8CgZZ7cFG5mog/iNFNpwJpdTZjPSZnAFP4cKzARAdrQomiX iyctCA8/oI5raHt8iVJVWtVMZYfHUIA+Znbu2jrqK2zkm3lZ0gc74/OjuPWj/WgJoNsl iuJS1Nkw3r801oj4at/0qVwO1fgC74ZL5yyZrJLUIEY4FmK0/jrl6ELhlw+qbRgVYYeF 7zg5oeZ0JFM6mNeQuooaQbezzLg83ZYhkaaXNwfkKHVByCXl6mzDGqwVfNN+a+6uvu5E 8FRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AmRx3EJ1; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f127si1030849pfa.221.2019.05.25.02.54.33; Sat, 25 May 2019 02:54:48 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AmRx3EJ1; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbfEYJx2 (ORCPT + 99 others); Sat, 25 May 2019 05:53:28 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42290 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbfEYJx1 (ORCPT ); Sat, 25 May 2019 05:53:27 -0400 Received: by mail-pl1-f196.google.com with SMTP id go2so5132366plb.9; Sat, 25 May 2019 02:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=NA52AjQwrBf0703k7sbVMul5zk1FYHOy+jnznCOJXL8=; b=AmRx3EJ1CyfEtKdIjY8ZDrQr0m1jRswY8/XwNvf56UU23rhvG/fGD8j/plzLZOLu0L sFBKDa7MpD+7lyh9brg7UskpvwPRuJ2vj4vv4qVpZQ3Ua8H1vY809JWKmIvt5hZIaWOK Wk8mPjffsaXVEuFUSltm5qfk4CsJH5hQMWNwOl/gVBZEHYQ2PkoZjKo47TMMUPkJPFkf jSaeLSUArtl9Y2ARNke/+IPxRsRqJHM15CVljWz14YjOmVbb9Hu3B4ZfCvWhuElPVId1 nfbGud+Tyzc4ldVH0FbVpY3xJbKlIkyRfpjDJRmzUS2IxiRyHvsAIyItqDCKG+L68RAN YnQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=NA52AjQwrBf0703k7sbVMul5zk1FYHOy+jnznCOJXL8=; b=t6dgL/v5eV2u20QxqYtmlv2ycEu1EdEu9rOI8yYi9yxr3YLKLwglM9taVkWKuzVm4v 6rPF7xfXOfU32tv6MsTeLvSVr/UVI+jSkTddcMQB8Pugf1RtxcBzKSIa8ZDXINFhSRPp tSKuR/f3xRWfxmv1yPeieqktpbEQurUEBguMkLfxBw7O9/Zpy5MuDyxBFfnqZ77wJAec c67jErMGfVSwkX5U7F5wyOoMwQK+pNvne9s7vWYp4JPc9cECvuk7AhLmmxqoYFNgqahO SWPISunANjTVYMpeQDh4wTjvTcWXdBaYqHxuvOZSPb3uwaE9f/oSWA9lWy1rTyj8vkW+ YSAg== X-Gm-Message-State: APjAAAWJ715ComfFJb/HvXvcqz1pe0XgnJcKfZqQExfBgO2yzFU6LNBT 017Y8yib09+a560Xh/+DfmVlMEMC X-Received: by 2002:a17:902:20e2:: with SMTP id v31mr112094575plg.138.1558778007294; Sat, 25 May 2019 02:53:27 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id t10sm5695367pfe.2.2019.05.25.02.53.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 02:53:26 -0700 (PDT) Date: Sat, 25 May 2019 15:23:22 +0530 From: Hariprasad Kelam To: Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: ds1347: fix warning PTR_ERR_OR_ZERO can be used Message-ID: <20190525095322.GA26245@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below warning reported by coccicheck ./drivers/rtc/rtc-ds1347.c:158:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Hariprasad Kelam --- drivers/rtc/rtc-ds1347.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c index 938512c..b97b67f 100644 --- a/drivers/rtc/rtc-ds1347.c +++ b/drivers/rtc/rtc-ds1347.c @@ -155,10 +155,7 @@ static int ds1347_probe(struct spi_device *spi) rtc = devm_rtc_device_register(&spi->dev, "ds1347", &ds1347_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) - return PTR_ERR(rtc); - - return 0; + return PTR_ERR_OR_ZERO(rtc); } static struct spi_driver ds1347_driver = { -- 2.7.4