From patchwork Tue Aug 29 14:05:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 9927463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 077676022E for ; Tue, 29 Aug 2017 14:05:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2E2822638 for ; Tue, 29 Aug 2017 14:05:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C802893E; Tue, 29 Aug 2017 14:05:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Flag: YES X-Spam-Level: **** X-Spam-Status: Yes, score=4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 X-Spam-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [65.50.211.133 listed in list.dnswl.org] * 1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net * [Blocked - see ] * 3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [103.254.204.108 listed in zen.spamhaus.org] * 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server * [103.254.204.108 listed in dnsbl.sorbs.net] * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (himanshujha199640[at]gmail.com) * 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is * CUSTOM_MED * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 790ED2893C for ; Tue, 29 Aug 2017 14:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=aC45aLCC9qaWLvCLLspuZBae73dagBxEFNKoeQ2LWUI=; b=sHG H7UjdvYleMP6rliI6rHu0DZOxg4eKeeWFV1/jHpxg2KbHjsA5MoQmmWHF27zdWtG38z2ozFU7DuL0 t46NS31Jum1c3d3Uvv/F954Q+QwZMpwPx6ESt2qN0Cp8V181XSv/R9xZDmw6TrzsWXowtGPFxtWI3 7Y8hGIi4k0SxEQkmAZYc7QtpH/dyGZosgnu0yG2ikFWGFz3g+YEoUFOyAZsXKVzNzy4FukfLLJTKY BlDhrYc+Bj60epy4u9aHrA9xLLloXvf2HxoA4N7xdHrboGmHnlTD45yN1hnYPSxVIg2nxGy8KkhWD iVEBRKkDS/r25k5//OnIoNZ2Qcr5Kjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dmh9L-0006Q5-5i; Tue, 29 Aug 2017 14:05:51 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dmh9C-0006Mh-3R for linux-arm-kernel@lists.infradead.org; Tue, 29 Aug 2017 14:05:49 +0000 Received: by mail-pf0-x241.google.com with SMTP id g13so2410218pfm.2 for ; Tue, 29 Aug 2017 07:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PFgjXV3r54RUjSA9EwP2asxtFoyphZ8kwiX1KOe8tdw=; b=gjvtHK/iujt1ez6Wp3CG+qZMkkwQenTwnzXAlK5C5l9gbu2eQZunYuYxXcyxZXh/QS Bysl5p8LppORCTj1U8zfI5bBIYTlcwXQBWGPBh2T0e0h+n5MjhD9gdde30wI1wBcnlb/ 1PRaGF8Iki0lzHPkH1Tsu5jrNMj7FjSqGa8RCdTFADeuNZh5OL/2V0zDhSNuzn/1uclD amGsI2UTXxX9u31uYljEV1iBnuAh95SVDP1Gp+KpCDDhUY0Uhwv2GXlH5d6F/JKvBH/x O13qAlfmL1ZgBP1MBBXVXyA+oMsyuuGSVMzLS3GxX0+2BrP7vQ88SkQlEC2MgUupvXHE 5h5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PFgjXV3r54RUjSA9EwP2asxtFoyphZ8kwiX1KOe8tdw=; b=sUn4+bTyfGJmkC//b4gL1dxBjvrj3fXnLlnAR+8E13Xmw+XbCWxQJqcOedZSODtVuR 69N+PJ2gHX/bi3NPhfrrcY7EMnXJDBfAnqRG4fw0D1Qo7Y90ZnKry6I90Dx+G55ql3rw flJw6kuYim6nkigwMGlwl+SPD2ghT1wYohidVhE3UOt+Y+9cGgBVKjJqFnFXYNmPaQvJ mhR7HeI8gQBYXkXpTH33TBnHKHJJXAPis7M+lRnS0imPkAyJpxqHwvDSUfkubOm3MXTz pLWHSyCvnUDYCAkqgMc0GKccrM1sX11Xt41YXJ2/9/043ivizvH+0Hi1sWK4bD0VIyrA aWnw== X-Gm-Message-State: AHYfb5iOMBw5M313isrsbGLchDsvXVPg6pIfzy+tZulkPVGJ82TLrtCN l2GLu3t3DtNKPQ== X-Google-Smtp-Source: ADKCNb7ir+YSCCDncKIiDNsMaybiCepLBPNYK9mpZV5yNpQDWEvlZcbcIMt699XrgKrINw+ixeDPEg== X-Received: by 10.99.112.20 with SMTP id l20mr435944pgc.424.1504015521107; Tue, 29 Aug 2017 07:05:21 -0700 (PDT) Received: from localhost.localdomain ([103.254.204.108]) by smtp.gmail.com with ESMTPSA id l85sm5619000pfg.175.2017.08.29.07.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 07:05:20 -0700 (PDT) From: Himanshu Jha To: wens@csie.org Subject: [PATCH] drm/sun4i: Use PTR_ERR_OR_ZERO Date: Tue, 29 Aug 2017 19:35:07 +0530 Message-Id: <1504015507-18259-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170829_070543_277612_FF152142 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Himanshu Jha , maxime.ripard@free-electrons.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 5 +---- drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 5 +---- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index d401156..35929b3 100644 --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c @@ -178,10 +178,7 @@ int sun4i_dclk_create(struct device *dev, struct sun4i_tcon *tcon) dclk->hw.init = &init; tcon->dclk = clk_register(dev, &dclk->hw); - if (IS_ERR(tcon->dclk)) - return PTR_ERR(tcon->dclk); - - return 0; + return PTR_ERR_OR_ZERO(tcon->dclk); } EXPORT_SYMBOL(sun4i_dclk_create); diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c index 4692e8c..882c80a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c @@ -120,8 +120,5 @@ int sun4i_ddc_create(struct sun4i_hdmi *hdmi, struct clk *parent) ddc->hw.init = &init; hdmi->ddc_clk = devm_clk_register(hdmi->dev, &ddc->hw); - if (IS_ERR(hdmi->ddc_clk)) - return PTR_ERR(hdmi->ddc_clk); - - return 0; + return PTR_ERR_OR_ZERO(hdmi->ddc_clk); } diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c index 5cf2527..44aa870 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c @@ -218,8 +218,5 @@ int sun4i_tmds_create(struct sun4i_hdmi *hdmi) tmds->hw.init = &init; hdmi->tmds_clk = devm_clk_register(hdmi->dev, &tmds->hw); - if (IS_ERR(hdmi->tmds_clk)) - return PTR_ERR(hdmi->tmds_clk); - - return 0; + return PTR_ERR_OR_ZERO(hdmi->tmds_clk); }