From patchwork Mon Jul 3 08:42:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 9822221 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 2832760246 for ; Mon, 3 Jul 2017 08:42:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C3D428396 for ; Mon, 3 Jul 2017 08:42:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 111322852D; Mon, 3 Jul 2017 08:42:42 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AF8BF28396 for ; Mon, 3 Jul 2017 08:42:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D6FBE6E223; Mon, 3 Jul 2017 08:42:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id B33EF6E21D for ; Mon, 3 Jul 2017 08:42:34 +0000 (UTC) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20170703084233epoutp0133cd3841fb940c509e34c85638fdb0df~NxXQApp5L0057900579epoutp013; Mon, 3 Jul 2017 08:42:33 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.64]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170703084232epcas1p3abbac4ce6eb038e7dd6b46e9c03af43f~NxXPwtLg-0583405834epcas1p3k; Mon, 3 Jul 2017 08:42:32 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id CE.73.06732.8730A595; Mon, 3 Jul 2017 17:42:32 +0900 (KST) Received: from epsmgms2p1.samsung.com (unknown [182.195.42.79]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170703084232epcas1p45bcdd67d70e604f72e1519f39018bf91~NxXPhluzj1420314203epcas1p4m; Mon, 3 Jul 2017 08:42:32 +0000 (GMT) X-AuditID: b6c32a39-f794b6d000001a4c-4b-595a03786bca Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 88.4D.05076.8730A595; Mon, 3 Jul 2017 17:42:32 +0900 (KST) Received: from localhost.localdomain ([10.113.62.206]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OSI00LC9AUV6B10@mmp2.samsung.com>; Mon, 03 Jul 2017 17:42:32 +0900 (KST) From: Inki Dae To: dri-devel@lists.freedesktop.org Subject: [PATCH 04/14] drm/bridge: vga-dac: clean up drm_bridge_add call Date: Mon, 03 Jul 2017 17:42:20 +0900 Message-id: <1499071350-25168-5-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1499071350-25168-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDKsWRmVeSWpSXmKPExsWy7bCmnm4Fc1SkwezLWha9504yWTR1vGW1 aDp0is2icfc2dovlZ9YxW1z5+p7NYtL9CSwO7B6X+3qZPBbvecnkcefaHjaP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e2789YPW4332c yaPl5H4Wj74tqxgD2KPcbDJSE1NSixRS85LzUzLz0m2VQkPcdC2UFPISc1NtlSJ0fUOClBTK EnNKgTwjAzTg4BzgHqykb5fglnGpbz5zwSTuilXLLzI2MK7i7GLk5JAQMJG4emcKO4QtJnHh 3nq2LkYuDiGB1YwSU37dYQJJCAn8YJTYuE4fxGYTUJWYuOI+G4gtIqAs8XfiKkaQBmaBOYwS S571soIkhAU8JOZfOAhmswA1XHt3DczmFXCRWHW2mwlim5zEyWOTweKcAq4SU7/eYIZY5iJx 7ehF1gmMvAsYGVYxcqUWFOem5xYbFRhuYgSG87bDWv47GH+cjT7EKMDBqMTD+6I4MlKINbGs uDL3EKMEB7OSCK8sQ1SkEG9KYmVValF+fFFpTmrxIUZToFMmMkuJJucDYy2vJN7QxNLIxMDM zNDIwNhMSZx3QuCXCCGB9MSS1OzU1ILUIpg+Jg5OqQZGu4nlZfqqzl1m625KTuDv5Ao9lH1J dUEV56XdWbO54ua+sXrxcrdLU8yxG4k6k4tnLM5OSNxybvG2nmfRxk+OzVA1/HKgSFk25ri9 31MnOQGGpL5WL98AiXS+6mj93Ql891eYtubu5suSfL7E4ZGHhs32iY+bX/w4qNhyQ6vubHPv Zm2Lc1+VWIozEg21mIuKEwHquy33fQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170703084232epcas1p45bcdd67d70e604f72e1519f39018bf91 X-Msg-Generator: CA X-Sender-IP: 182.195.42.79 X-Local-Sender: =?UTF-8?B?64yA7J246riwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SW5raSBEYWUbVGl6ZW4gUGxhdGZvcm0gTGFiLhtTYW1zdW5n?= =?UTF-8?B?IEVsZWN0cm9uaWNzG1NlbmlvciBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170703084232epcas1p45bcdd67d70e604f72e1519f39018bf91 X-RootMTR: 20170703084232epcas1p45bcdd67d70e604f72e1519f39018bf91 References: <1499071350-25168-1-git-send-email-inki.dae@samsung.com> Cc: daniel.vetter@intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch removes unnecessary checking of return value. Signed-off-by: Inki Dae --- drivers/gpu/drm/bridge/dumb-vga-dac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c index 831a606..8a52539 100644 --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c @@ -177,7 +177,6 @@ static struct i2c_adapter *dumb_vga_retrieve_ddc(struct device *dev) static int dumb_vga_probe(struct platform_device *pdev) { struct dumb_vga *vga; - int ret; vga = devm_kzalloc(&pdev->dev, sizeof(*vga), GFP_KERNEL); if (!vga) @@ -186,7 +185,7 @@ static int dumb_vga_probe(struct platform_device *pdev) vga->vdd = devm_regulator_get_optional(&pdev->dev, "vdd"); if (IS_ERR(vga->vdd)) { - ret = PTR_ERR(vga->vdd); + int ret = PTR_ERR(vga->vdd); if (ret == -EPROBE_DEFER) return -EPROBE_DEFER; vga->vdd = NULL; @@ -207,11 +206,9 @@ static int dumb_vga_probe(struct platform_device *pdev) vga->bridge.funcs = &dumb_vga_bridge_funcs; vga->bridge.of_node = pdev->dev.of_node; - ret = drm_bridge_add(&vga->bridge); - if (ret && !IS_ERR(vga->ddc)) - i2c_put_adapter(vga->ddc); + drm_bridge_add(&vga->bridge); - return ret; + return 0; } static int dumb_vga_remove(struct platform_device *pdev)