From patchwork Fri Jul 10 15:30:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 11656877 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4964813B6 for ; Fri, 10 Jul 2020 15:32:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 212D92065D for ; Fri, 10 Jul 2020 15:32:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KTbPfASJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="i5f0uUoQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 212D92065D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To: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:List-Owner; bh=juLsS2h8BC14NkEsusVz01b3LZuno4BRZm4pQzlIubo=; b=KTbPfASJBgB4qG/1GMstZXQvt7 mFvVgZt6WTreh4YAxHBp/MNDpsN4Hxyz1psmA/1ms4rQ4s9wFse+bhMMCx6LuVZiLxW6t5o4V4qIx 8jdrmPQU1PrkSeBqfTQRnN6mHJXvb87ZMx1hQedXX5gSK2gJS/GkVUYom3QtRupod+Sjyz642s74P NSMD2WBevI3CfO8Y2PbhmTSZs8+l+hMQGEgou4B4U+/eJU6jIYqqmgxUZv9XFHw7C3UpBVwVBGMbM 2dX/EHSm3zfxZ3HlZcNtWikExZ2SBz29h2C4GLyOycWSlgn54JhotpOKmcQlwP6m3x6jrBC67K3XJ u3D1bmKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtuzF-00013m-9R; Fri, 10 Jul 2020 15:30:53 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtuyp-0000v8-UJ for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 15:30:30 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200710153027euoutp01e140953363ff2de4aa0b797b4f028195~gbdRnXAJi1950919509euoutp01m for ; Fri, 10 Jul 2020 15:30:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200710153027euoutp01e140953363ff2de4aa0b797b4f028195~gbdRnXAJi1950919509euoutp01m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594395027; bh=B440VBDLdLWidVVzamEgT8cxdzc8DwUiqZOX84CTZVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i5f0uUoQ7ZR/lmT8DV8Ur5GoXgnkpZxKkpWkonx8e+aSgdxKiOtGPM6ysC2fgP5CV uxyfrzxK7XDW2SsjZ9vk65SJPE9RG0XBj0yZLwbL3jdtaDRliQIZiY32TVa+XC+uOi YZctEST0sMeQoXccz45vFkUOw66gzn8a32I/7V/I= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200710153026eucas1p1d277077a856967448ceb2c8ef06d4307~gbdRMgux-2715527155eucas1p1d; Fri, 10 Jul 2020 15:30:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 40.26.06318.299880F5; Fri, 10 Jul 2020 16:30:26 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200710153026eucas1p208e5850ddd9e7f376c4d56f892b05233~gbdQ1mvuI2493924939eucas1p2s; Fri, 10 Jul 2020 15:30:26 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200710153026eusmtrp11fbd8efa90c6d8b454a6933eebba61e3~gbdQ072S22243522435eusmtrp1u; Fri, 10 Jul 2020 15:30:26 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-d5-5f088992fc78 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 10.48.06017.299880F5; Fri, 10 Jul 2020 16:30:26 +0100 (BST) Received: from AMDC3748.digital.local (unknown [106.120.51.74]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200710153025eusmtip1c92b174adfcb32307df709cdaf7dd4b7~gbdQEhRTv0878108781eusmtip1t; Fri, 10 Jul 2020 15:30:25 +0000 (GMT) From: Andrzej Hajda To: Greg Kroah-Hartman Subject: [PATCH v8 4/5] drm/bridge: lvds-codec: simplify error handling Date: Fri, 10 Jul 2020 17:30:17 +0200 Message-Id: <20200710153018.12226-5-a.hajda@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710153018.12226-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSaUhUURzFufNWBydeT8Gb1UhjggqlYeQ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OM FhtnrGe1mPrwCZvF/20TmS2ufH3PZtG8eD2bxdXvL5ktTr65ymLROXEJu8Wmx9dYLS7vmsNm cWjqXkaLtUfuslsc6ou2mPtlKrODgMflaxeZPd7faGX32PttAYvHzll32T1md8xk9di0qpPN 48SES0we++euYfe4332cyWPzknqPvi2rGD0O9E5m8fi8SS6AN0rPpii/tCRVISO/uMRWKdrQ wkjP0NJCz8jEUs/Q2DzWyshUSd/OJiU1J7MstUjfLkEvY8bme0wFc7kqJny7x9TAeI2ji5GT Q0LAROLYyw9sXYxcHEICSxklZt9fwwSREJfYPf8tM4QtLPHnWhcbiC0k8IlRor2zAMRmE9CU +Lv5JlhcRMBYov/sLHaQQcwCbawSc88/YQdJCAu4S7S1XGIFsVkEVCX+nLwHtoBXwEKi5/pr RogF8hKrNxwAW8YpYCnxbmo31DILidvLvrNOYORbwMiwilEktbQ4Nz232EivODG3uDQvXS85 P3cTIzC2th37uWUHY9e74EOMAhyMSjy8CxI54oVYE8uKK3MPMUpwMCuJ8DqdPR0nxJuSWFmV WpQfX1Sak1p8iNEU6KiJzFKiyfnAuM8riTc0NTS3sDQ0NzY3NrNQEuftEDgYIySQnliSmp2a WpBaBNPHxMEp1cC44fjrpRHTOo2UHLjUipeLTpf8PeuSj5fkAufop0LH+jxk5FOC6pamxaeZ f3Kcptyev+9T+B19CW3tN5yBUcu7o7YeO6KY//FAZNr7KZ+1d7n+rTklf3+vwQbr769NhaPO vnfQmNc1r4wp9u9p9rpjfzaF78i+UJa0fNKmC//KCzj3iTeemXpeiaU4I9FQi7moOBEAPT6F 38MCAAA= X-CMS-MailID: 20200710153026eucas1p208e5850ddd9e7f376c4d56f892b05233 X-Msg-Generator: CA X-RootMTR: 20200710153026eucas1p208e5850ddd9e7f376c4d56f892b05233 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200710153026eucas1p208e5850ddd9e7f376c4d56f892b05233 References: <20200710153018.12226-1-a.hajda@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_113028_177840_EE5E64A8 X-CRM114-Status: GOOD ( 14.59 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [210.118.77.11 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.11 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , "Rafael J. Wysocki" , Jonas Karlman , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, "open list:DRM DRIVERS" , Russell King - ARM Linux , Neil Armstrong , Andrzej Hajda , andy.shevchenko@gmail.com, Mark Brown , Laurent Pinchart , Daniel Vetter , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/lvds-codec.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c index 24fb1befdfa2..f19d9f7a5db2 100644 --- a/drivers/gpu/drm/bridge/lvds-codec.c +++ b/drivers/gpu/drm/bridge/lvds-codec.c @@ -71,13 +71,9 @@ static int lvds_codec_probe(struct platform_device *pdev) lvds_codec->connector_type = (uintptr_t)of_device_get_match_data(dev); lvds_codec->powerdown_gpio = devm_gpiod_get_optional(dev, "powerdown", GPIOD_OUT_HIGH); - if (IS_ERR(lvds_codec->powerdown_gpio)) { - int err = PTR_ERR(lvds_codec->powerdown_gpio); - - if (err != -EPROBE_DEFER) - dev_err(dev, "powerdown GPIO failure: %d\n", err); - return err; - } + if (IS_ERR(lvds_codec->powerdown_gpio)) + return dev_err_probe(dev, PTR_ERR(lvds_codec->powerdown_gpio), + "powerdown GPIO failure\n"); /* Locate the panel DT node. */ panel_node = of_graph_get_remote_node(dev->of_node, 1, 0);