From patchwork Fri Jun 26 10:01:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 11627037 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 280B5912 for ; Fri, 26 Jun 2020 10:09:56 +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 00077206C0 for ; Fri, 26 Jun 2020 10:09:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oYBMSzZv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cqowPQkz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="hrA8eI/O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00077206C0 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=uKFk7NTmzTeKCAky2B9iupyK9uREMhP2IgsY2lkX14Q=; b=oYBMSzZvJ1Zwyfo/tss4MpXrz0 b8GpEF5fygsr6NqVvYwltUykm9Lk4dmRiyyyNLAUS2UM73a2O8RC4ZT2TJ0YOgslnwxrJXEZWOOJq S7rAlWeTV8p76otT9CJkAJlfaysyPm5fQyr7TXQCnPtRY0tpkOp4MWEmbia6E9LIj8redgkg9qGlo PoUNq981MdD6ADmGGbOfXkxdsMb5R30CbFLXNb+/qk7FlsF2HGOgsSrxsPpk9qK35ubdpljAynwbe Ynwiz7cibDmcYDISZC3CtOEymW/SeT0quGbulzayJqa5JolqD6zCaRmPaKw5YSS59U5v02tqE7XeR zhFabSlg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolHC-0002QC-8u; Fri, 26 Jun 2020 10:08:06 +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 1jolDa-0000aR-6Q for linux-arm-kernel@merlin.infradead.org; Fri, 26 Jun 2020 10:04:22 +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=FHCuuaIM6iYHipda4rakjqMi4ghKc6Dm3/I5/j2IFWo=; b=cqowPQkzOi8Aiqdx9mvE8Zsae3 u92bWP3nbHDiygF5ZpDIGrqKjPf/aaRCmxdXsvV24l5EqiTMsf1Wuf4A2LUYfB/KjHAmu2MCngc6s 9wD87Fgzk44hBM+IiIFbRgXgw5BO2DbSbgJWv6a0nX40k2ADRQrkXzoB6ewgTYdixSYFbydLbOYLe uC3R2EjJbiw1z2N9tn+1OKBMzrfJVLSmCobnstEMocHiI1JNPcZWa+qkBtsufrI/VbeGsjRCGiJez SBQJPOfLrYEpOkOg+hkhj6OQsiunkSRbWo2OonggNTDJgXp38f1+FxWtpI20Q9T5Y9zeVIFjxnlno 2MO35IFA==; 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-0003aa-Ow for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 10:01:34 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200626100111euoutp0142249824cdd47325d69bc2d89ca78965~cD7zPDvTo0693406934euoutp01o for ; Fri, 26 Jun 2020 10:01:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200626100111euoutp0142249824cdd47325d69bc2d89ca78965~cD7zPDvTo0693406934euoutp01o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593165671; bh=FHCuuaIM6iYHipda4rakjqMi4ghKc6Dm3/I5/j2IFWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hrA8eI/OFM5nK6TDghuwcmWoCGT/BoU1SJ4hBfWBsHjVjRBWj4RE1ZAfxKmV/NXpN uwj4M3LGoqD2Z3yAf6zb49VIWFBUf30r6F16Ma4ToC58IN7dqvocmW2sbxgsaxr0BF vYquaA3aXNq5P5fLRV3PZqKhivS9yic0Azj7ATjA= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200626100111eucas1p2a3fc77556f77587970444e08c7bfbd29~cD7y4vQM40241702417eucas1p2q; Fri, 26 Jun 2020 10:01:11 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 21.EB.06456.767C5FE5; Fri, 26 Jun 2020 11:01:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200626100110eucas1p24327c924dada0c2e86ecf0ab5b5af571~cD7yfZReH0240902409eucas1p2-; Fri, 26 Jun 2020 10:01:10 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200626100110eusmtrp2e1590d0784faf930f3ae366b4abbe2c5~cD7yeyj9e1303213032eusmtrp2U; Fri, 26 Jun 2020 10:01:10 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-37-5ef5c7679853 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 55.86.06017.667C5FE5; Fri, 26 Jun 2020 11:01:10 +0100 (BST) Received: from AMDC3748.digital.local (unknown [106.120.51.74]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200626100110eusmtip10e216f4cb07c1f1d10a5fb2c27eddda1~cD7xo50po2131121311eusmtip1A; Fri, 26 Jun 2020 10:01:10 +0000 (GMT) From: Andrzej Hajda To: Greg Kroah-Hartman Subject: [PATCH v6 3/4] drm/bridge/sii8620: fix resource acquisition error handling Date: Fri, 26 Jun 2020 12:01:02 +0200 Message-Id: <20200626100103.18879-4-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: H4sIAAAAAAAAA0VSfUyMcRzf757X0rXHyfqNlG5rw0YS28/LvLb2mI0wfyguR49q1ZV7VNio RF2ld72IJtTkQlx1uVrrXK3TUnqXI0fILrVGhVqi6wn/fb6fz/fz+X6/v/1oTNJGLKGDFac5 pUIeKiVtcW3T5IvVgcYJ2druAQkyPWwjkCWjAaDH+eUEynn/kUS/tZkY6p4YJVH8nXIS9fyw YKh5uAdHSZnFFNJ86CVQV80NEhly6gB60NhPIUOaHyocz8G2M2xXbwfGjvZdpti670U4qyvo p9jrqmsEq1EnkeyzjE4RW194n2LNKUYRW1Ecw6ZVqgGrT83G2TGNs4/Y13ZLABcaHMUp3bce sw2qyu8gIobtz7Tfdo4FuX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xcgJFBeX2D3/LTOELSzx51oXG0TRJ0aJhc2zmUASbAKa En833wRrEBEwlug/O4sdpIhZoI1VYu75J+wgG4QFgiXWnRUFqWERUJW4NnUCWD2vgIXEz8Nz WSAWyEus3nAAbBmngKXE9Fu9rCCtQkA1nUsiJzDyLWBkWMUoklpanJueW2ykV5yYW1yal66X nJ+7iREYVduO/dyyg7HrXfAhRgEORiUe3gMTv8QJsSaWFVfmHmKU4GBWEuF1Ons6Tog3JbGy KrUoP76oNCe1+BCjKdBNE5mlRJPzgRGfVxJvaGpobmFpaG5sbmxmoSTO2yFwMEZIID2xJDU7 NbUgtQimj4mDU6qBcc2rTZ+6/d2uSLewHij6tDV1qtDLXSu5eiI2/esKXVV14kh/ifucVd1L ZLdWeYeyGM9hq95oWmLSF9iTLnd3TtCapPN2l15dnh/BnGnqHP0y4zEbV5xVg6Vw9nylu/YP Cvdcytdpv3u803na0dOq5ZpyG6YkTFxvfPTiqaAZEx9MZTCoXmcSocRSnJFoqMVcVJwIAAI3 g3bAAgAA X-CMS-MailID: 20200626100110eucas1p24327c924dada0c2e86ecf0ab5b5af571 X-Msg-Generator: CA X-RootMTR: 20200626100110eucas1p24327c924dada0c2e86ecf0ab5b5af571 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200626100110eucas1p24327c924dada0c2e86ecf0ab5b5af571 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_541555_8CEF9F47 X-CRM114-Status: GOOD ( 14.58 ) 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 In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/sil-sii8620.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c index 92acd336aa89..389c1f029774 100644 --- a/drivers/gpu/drm/bridge/sil-sii8620.c +++ b/drivers/gpu/drm/bridge/sil-sii8620.c @@ -2299,10 +2299,9 @@ static int sii8620_probe(struct i2c_client *client, INIT_LIST_HEAD(&ctx->mt_queue); ctx->clk_xtal = devm_clk_get(dev, "xtal"); - if (IS_ERR(ctx->clk_xtal)) { - dev_err(dev, "failed to get xtal clock from DT\n"); - return PTR_ERR(ctx->clk_xtal); - } + if (IS_ERR(ctx->clk_xtal)) + return dev_err_probe(dev, PTR_ERR(ctx->clk_xtal), + "failed to get xtal clock from DT\n"); if (!client->irq) { dev_err(dev, "no irq provided\n"); @@ -2313,16 +2312,14 @@ static int sii8620_probe(struct i2c_client *client, sii8620_irq_thread, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "sii8620", ctx); - if (ret < 0) { - dev_err(dev, "failed to install IRQ handler\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, + "failed to install IRQ handler\n"); ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(ctx->gpio_reset)) { - dev_err(dev, "failed to get reset gpio from DT\n"); - return PTR_ERR(ctx->gpio_reset); - } + if (IS_ERR(ctx->gpio_reset)) + return dev_err_probe(dev, PTR_ERR(ctx->gpio_reset), + "failed to get reset gpio from DT\n"); ctx->supplies[0].supply = "cvcc10"; ctx->supplies[1].supply = "iovcc18";