From patchwork Fri Jul 31 09:31:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51763 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 9340D22D9C for ; Fri, 31 Jul 2015 09:31:30 +0000 (UTC) Received: by laah7 with SMTP id h7sf22215592laa.2 for ; Fri, 31 Jul 2015 02:31:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=CUch7WWlr7Lo98aKR7TfeObOz/DisGMdEM+yDAjh/To=; b=lH8flX5M9MYbP6kWsNMHyp4FOXU25ER7aj2TycMPK4exf3TESZkzhSvbxGCEZkIYsQ jhRrwzfyhdtdmMu3J1nrcCOalMxUm/UZLLQhbdNwEFQrm0uxHburSBeW97meBJe5NUqt zVHYBmSGfW4H5b3gjewhGle5RMAKM1vocxQZbY2MK4eZurhAfGkly6JYAh/vPcjNpqLr IuLzgmfzp/+kYr3f6eyE6BocHAkMMrWVE++FgCDDL1vUVHc7O5Rny11bcOjEhnReM3iy UYlWWjVzbmXgBJoHpYi2jo0w309GonNRVkPtBYzEbN8wxqFqiIMTZE7KHvrR7y2ppXLw 3ORw== X-Gm-Message-State: ALoCoQnFZzmHGbnAEL2zwQzycI798BV3tYbCAtz/T1DPTnfq3nRxsMMKzjokU0l4Vj2A/7Tk7gRA X-Received: by 10.152.115.196 with SMTP id jq4mr639059lab.1.1438335089479; Fri, 31 Jul 2015 02:31:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.202 with SMTP id 10ls317046law.79.gmail; Fri, 31 Jul 2015 02:31:29 -0700 (PDT) X-Received: by 10.112.91.196 with SMTP id cg4mr1885946lbb.10.1438335089003; Fri, 31 Jul 2015 02:31:29 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id lc7si3112794lac.95.2015.07.31.02.31.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 02:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laah7 with SMTP id h7so40439576laa.0 for ; Fri, 31 Jul 2015 02:31:28 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr1815984lbp.88.1438335088109; Fri, 31 Jul 2015 02:31:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp257019lba; Fri, 31 Jul 2015 02:31:26 -0700 (PDT) X-Received: by 10.70.101.167 with SMTP id fh7mr66082pdb.135.1438335086245; Fri, 31 Jul 2015 02:31:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pa5si9166123pac.22.2015.07.31.02.31.25; Fri, 31 Jul 2015 02:31:26 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752862AbbGaJbX (ORCPT + 28 others); Fri, 31 Jul 2015 05:31:23 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:34468 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbbGaJbU (ORCPT ); Fri, 31 Jul 2015 05:31:20 -0400 Received: by pdbbh15 with SMTP id bh15so39679748pdb.1 for ; Fri, 31 Jul 2015 02:31:20 -0700 (PDT) X-Received: by 10.70.34.207 with SMTP id b15mr4789997pdj.151.1438335080073; Fri, 31 Jul 2015 02:31:20 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id ex1sm6541079pdb.57.2015.07.31.02.31.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 02:31:19 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kbuild test robot , Viresh Kumar , Alessandro Zummo , Alexandre Belloni , Hans Ulli Kroll , linux-arm-kernel@lists.infradead.org (moderated list:ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE), rtc-linux@googlegroups.com (open list:REAL TIME CLOCK (RTC) SUBSYSTEM) Subject: [PATCH] drivers: rtc: fix ptr_ret.cocci warnings Date: Fri, 31 Jul 2015 15:01:04 +0530 Message-Id: <20150731091703.GA140615@lkp-ib03> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: kbuild test robot drivers/rtc/rtc-gemini.c:151: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 Signed-off-by: Fengguang Wu Signed-off-by: Viresh Kumar --- Got a cleanup patch from Fengguang, maybe we can apply this too. rtc-gemini.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ --- a/drivers/rtc/rtc-gemini.c +++ b/drivers/rtc/rtc-gemini.c @@ -148,10 +148,7 @@ static int gemini_rtc_probe(struct platf rtc->rtc_dev = rtc_device_register(pdev->name, dev, &gemini_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc->rtc_dev)) - return PTR_ERR(rtc->rtc_dev); - - return 0; + return PTR_ERR_OR_ZERO(rtc->rtc_dev); } static int gemini_rtc_remove(struct platform_device *pdev)