From patchwork Fri Jun 26 10:01:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 11627227 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 9174E913 for ; Fri, 26 Jun 2020 11:24:08 +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 66407206A1 for ; Fri, 26 Jun 2020 11:24:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hVopxAPm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FKZru85a"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="lpVNe9om" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66407206A1 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=8shxZP/xP3pZcsJCPpj7Z8Dwb7GbVCfZkAe+g6+Qxm8=; b=hVopxAPm5RWTHVpSeFxGqfrp02 70vLPQW7W44+gIH0g81T6DV0TIQ0j7voexPFGmn/p5O4XkMuR6BUU8H8p5fEHwBfUmcXuWU5uehuI +rBBMR+3iG5mF2lryEB4giUuMjIWbTEAcuAjFnwCHGrECZJd1ZTATNBdZ8dPwDxurL4ygBLYcW0GK RzDEN6hAsn0bRf/guCsfbNPkhk2s3xG0aciyDI5DTgQxFFZxxcDbcmrAIc4ohBGTyWzuFzGAEUAOn 13KzA7jDC7NSXU9+d7WUbb9d6vzudzr4SN5EYpK777hnKBeNicVtDNNXm1N2FJY946qSi6H6xJkDV zjQ1/h1A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomRL-0000ms-4R; Fri, 26 Jun 2020 11:22:39 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolDZ-0000hS-HX for linux-arm-kernel@merlin.infradead.org; Fri, 26 Jun 2020 10:04:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:Content-Type:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fQMNu6sWDptDAr6/vT/QHkEA8xvrKj4wgjHFZNOz7Ao=; b=FKZru85akX4TzYXkqTZx/M1IDp vkjV4XLEutpoPUQLebOi8HDGd3EErWRhkp5WSVnc9J+g+Rn4mpxfh5HtXzGbu9W8TelGgbrCTNtor +8d8qwtmNXuzcN1atmnNudIBTkuXrolAUYaNpU9iXqzhC7zRmpgt7YGk3OiC0ryOXd6y80PZGnr2k qNxxbM6NgYigJByMf5n2XIDNvSlundBsXCLqA4FUSLAGeaU/qwf4eoI34Ab3iE81WQQ2KuDABSpbi WGldCY7xj9cl0+f0k89nOLHoE5IFjLjO5IMs7BCHQ3aMATu6tTS5loBLD3HnOHd3q+fOlZekxa9ii faG4TlnA==; Received: from mailout1.w1.samsung.com ([210.118.77.11]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolAX-0003b3-Ov for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 10:01:38 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200626100112euoutp01d83eaa1eb77cb82792935e1b58ae36a0~cD7z6dS880658406584euoutp01- for ; Fri, 26 Jun 2020 10:01:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200626100112euoutp01d83eaa1eb77cb82792935e1b58ae36a0~cD7z6dS880658406584euoutp01- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593165672; bh=fQMNu6sWDptDAr6/vT/QHkEA8xvrKj4wgjHFZNOz7Ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lpVNe9omwXEPlO6h8p0Gi1Fhy/ZRFWHx+0LogdW4+hAdnNc/vlpXE/VYqdMlHJgYg CT5hH0mxb1cNsJGVNpZaSAffSLjt7Yx0xoXVDYM7TieryTOigyCpStcg+6Oa4v0T3u 3LzT2gvGlC4Odf77k3D8jxtOEeAREXbQ03ZlPtzc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200626100112eucas1p24ede723f8f1211f52807bcd5beef82ee~cD7zkzPvd1856218562eucas1p2O; Fri, 26 Jun 2020 10:01:12 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id FA.B3.05997.867C5FE5; Fri, 26 Jun 2020 11:01:12 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200626100111eucas1p18e175e6c77af483bd80fb90c171b05db~cD7zP1nsi1585815858eucas1p1T; Fri, 26 Jun 2020 10:01:11 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200626100111eusmtrp2d0bae6ed7bc417a53d8edd19c0ea7f1c~cD7zOhJL61350013500eusmtrp2F; Fri, 26 Jun 2020 10:01:11 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-d0-5ef5c7685195 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 17.86.06017.767C5FE5; Fri, 26 Jun 2020 11:01:11 +0100 (BST) Received: from AMDC3748.digital.local (unknown [106.120.51.74]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200626100110eusmtip19acd13a6af9c0b1fd47584ae7feb08bf~cD7yenk9Q2495924959eusmtip1O; Fri, 26 Jun 2020 10:01:10 +0000 (GMT) From: Andrzej Hajda To: Greg Kroah-Hartman Subject: [PATCH v6 4/4] drm/bridge: lvds-codec: simplify error handling Date: Fri, 26 Jun 2020 12:01:03 +0200 Message-Id: <20200626100103.18879-5-a.hajda@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200626100103.18879-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0iTURjHOXuvjhZvM/Cg2WUllZBWFp0opLTLi4FlH/rQxXrLlyluSzat lCC7mfM2zbykRqOU2Uxnq0St0DZpiU68pKlkll3ITCrcCkdlm++sb7/zPP/n/3/O4dCY1E74 0wmqZF6t4hQyUow3PJvuWhNvc8aufWym0HBdF4HG860A3Ss1Eajo7XsSzTQUYOiF8yuJLt42 kaj/5ziG2r/040hbUEkh87sBAvU1V5DIUvQEoNq2EQpZ8g6hG44ibBvD9g30YOzXwcsU++SH HmebykYotjzzOsGajVqSfZ7fK2Jbbtyl2NFsm4i9X3mOzXtgBGxrbiHOTpkX75McFG+N4xUJ p3h1aPgxcfz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xcHEICSxklGi/sZIdIiEvsnv+WGcIWlvhzrYsNougTo8SMK7sYQRJsApoS fzffZAOxRQSMJfrPzmIHKWIWaGOVmHv+CdgkYQF3iRmvV4MVsQioStxZ+QBoKgcHr4CFRONx N4gF8hKrNxwAW8YpYCkx/VYvK0iJEFBJ55LICYx8CxgZVjGKpJYW56bnFhvpFSfmFpfmpesl 5+duYgRG1rZjP7fsYOx6F3yIUYCDUYmH98DEL3FCrIllxZW5hxglOJiVRHidzp6OE+JNSays Si3Kjy8qzUktPsRoCnTSRGYp0eR8YNTnlcQbmhqaW1gamhubG5tZKInzdggcjBESSE8sSc1O TS1ILYLpY+LglGpg3NjVe7L1+q32KTsdPoqGPlWym/J/9bmzl+VD5K9HfMzUkV6fy+OerlGS /LTkto9R4RGHh1l5P+/tCvN72PvgMHNjdMWClXa/2WclFZ+wDxYUeaP/9Vpv2sLA+p+Su5v9 7V994hI0mTj/8JnYXR9/psT+73/9+cFnLe30vDiufXPFdXzzs0W2KbEUZyQaajEXFScCACoG v53CAgAA X-CMS-MailID: 20200626100111eucas1p18e175e6c77af483bd80fb90c171b05db X-Msg-Generator: CA X-RootMTR: 20200626100111eucas1p18e175e6c77af483bd80fb90c171b05db X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200626100111eucas1p18e175e6c77af483bd80fb90c171b05db References: <20200626100103.18879-1-a.hajda@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_110114_696726_03C4511B X-CRM114-Status: GOOD ( 14.88 ) X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-7.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.11 listed in wl.mailspike.net] -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] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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);