From patchwork Wed Nov 7 02:34:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10671757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC4BF1751 for ; Wed, 7 Nov 2018 02:26:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D18222B5BF for ; Wed, 7 Nov 2018 02:26:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3F802B5A7; Wed, 7 Nov 2018 02:26:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 547E92B5A7 for ; Wed, 7 Nov 2018 02:26:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=VojotPsVOUW0bG1qW1vMH9mU4P6Uex4sZQfZa6fagzw=; b=SvXDs+TkcYUTAY UBirMZitjiZuXTVSrKoCFq6669D6tzDZDtFzvfuqKe+veyUt8NGJ8HdaiAHHbBViVUpa1gF4s7dLM ZJRN57VXJfUJOcM4RCR48vmJU0cjv3Il4SvAHyMh+TMGiErENiQ78w7rt5DnUxEnDYaSVVOBBAunD j2zhw8Lo+DiBT7TYrtvxWstzbe38gwxi0XAgpZcIeUgznfFWoYsGEeGDXgD/FLR2fGdx8pGv6SluR Tws3mOe10og1bUP1uPgYdVCt6mFGaZ+t/OEhoInYlwK5wl9wN4AGzo8BDLka6LBMJW58O9MTL+ujm 1S+BHgYu8XTYCAbwXoFw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKDXm-00088L-1O; Wed, 07 Nov 2018 02:26:10 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKDXk-00088B-2J for linux-arm-kernel@bombadil.infradead.org; Wed, 07 Nov 2018 02:26:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FacgTzkbwFm3C0faN1zVDqzQd68GEh30cO3fDRGHkSg=; b=phIttxrrTNmRnrP/EtUHCQXBwX CQaITK17kwXp9Ck7XrPw6IQfVnJkjjjRDmXI8R7ZTgKMrgTsxYPQJeQs+QqMxcf/gmFyjBLHNoA4o Sx5jz25/RucAGmriRikJ+wNntQDOEdwpP8k+wa5rBxqk35qpBL2qHFwoi4N25IT43OyTj1n0jEqJg vlKLC+8XrsKH1HWCrusXkzTieUR9oLnMB6tfNaJJiFlCJHngj7xwEfk6rpXdYWGhPPej052gMD07z 3j2nsC/7AAjs23s9R1m/HqjP42vk94C/2rJ2sJJHcyhINR1Mw8vCmWRaD6wkKKBLQ6pGPPCc+j1tO NkqRoMSw==; Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKDXg-0001Zt-VJ for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 02:26:05 +0000 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 55A58F47CBDF8; Wed, 7 Nov 2018 10:24:43 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Wed, 7 Nov 2018 10:24:36 +0800 From: YueHaibing To: Maxime Ripard , David Airlie , Chen-Yu Tsai Subject: [PATCH -next] drm/sun4i: hdmi: Use PTR_ERR_OR_ZERO in sun4i_tmds_create() Date: Wed, 7 Nov 2018 02:34:23 +0000 Message-ID: <1541558063-100341-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_212605_388235_D90A6EEE X-CRM114-Status: UNSURE ( 7.16 ) 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: kernel-janitors@vger.kernel.org, YueHaibing , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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: YueHaibing --- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c index fb985ba..3d5ee6f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c @@ -232,8 +232,5 @@ int sun4i_tmds_create(struct sun4i_hdmi *hdmi) tmds->div_offset = hdmi->variant->tmds_clk_div_offset; 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); }