From patchwork Tue Jul 12 11:06:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 9225075 X-Patchwork-Delegate: agross@codeaurora.org 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 2CA9F60572 for ; Tue, 12 Jul 2016 11:07:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D73727F46 for ; Tue, 12 Jul 2016 11:07:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10D4327F7F; Tue, 12 Jul 2016 11:07:30 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3949627F46 for ; Tue, 12 Jul 2016 11:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932210AbcGLLH2 (ORCPT ); Tue, 12 Jul 2016 07:07:28 -0400 Received: from m12-13.163.com ([220.181.12.13]:43989 "EHLO m12-13.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbcGLLH0 (ORCPT ); Tue, 12 Jul 2016 07:07:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=6Td+6 26eIwwV4eF4CPbgc++6pftuIb6N/QPbh/Ej6BA=; b=IE0Pay7MOJPX7s+LXjLt0 CjCdmFVKw4jB+cdI4sQ6Xcfzn9xs8mS46xlFFQvi69AfCnYuMiBxl9BMvOF/SxXg Sre26LtaLQ+23rF4RCF1ollMlT/rdXUm0bToANV2+luQ/KreE6dN21BGgUoGiOa8 7cBqoTx9jk6xucuxVBoWT8= Received: from localhost.localdomain.localdomain (unknown [180.110.253.144]) by smtp9 (Coremail) with SMTP id DcCowACnr0dMz4RXnOQNAA--.160S2; Tue, 12 Jul 2016 19:06:52 +0800 (CST) From: weiyj_lk@163.com To: Rob Clark , David Airlie , Arnd Bergmann Cc: Wei Yongjun , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH -next] drm/msm/hdmi: use PTR_ERR_OR_ZERO() to simplify the code Date: Tue, 12 Jul 2016 11:06:52 +0000 Message-Id: <1468321612-16384-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CM-TRANSID: DcCowACnr0dMz4RXnOQNAA--.160S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7WryUZr1ftF4Dtw48Zr45GFg_yoWftrg_Wa 4Fkrn3Zr17KFn0qF4akrWIv3s2vF1DuF4FqFs3KayfAwnrX34kAFnxKrW5Xr9rZFW5XFyD Aa1fXr1Fyr1DJjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnTv3UUUUUU== X-Originating-IP: [180.110.253.144] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/1tbiNQyk1lSIOudTmgAAsD Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun --- drivers/gpu/drm/msm/hdmi/hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 33bf52c..9737207 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -537,10 +537,7 @@ static int msm_hdmi_register_audio_driver(struct hdmi *hdmi, struct device *dev) PLATFORM_DEVID_AUTO, &codec_data, sizeof(codec_data)); - if (IS_ERR(hdmi->audio_pdev)) - return PTR_ERR(hdmi->audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(hdmi->audio_pdev); } static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)