From patchwork Mon Dec 18 10:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13496613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3EA15C46CA2 for ; Mon, 18 Dec 2023 10:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KkPXxQN4mkk8Wq9qxgRMercmcAE4l8NM7jCzQv/6j1k=; b=1t32wFTRw1Jd8F AAoED8aNREK7+akDbDHz2Qz1HMJ0/Iw28i0db2eGOYs2gs5GuiElLieaZ3b4K3zAV1dCU05IHpZ5G NmgBjcbrVj+Xb/nO82pmi4DNVjYMjgYHj9FDQsbBs/Vwz2Pmmo/p/gMp6cg2GqhsDCduEg41j4MtM t7e4wNuFQ2FG8wGPR9p43BXT4DH/vSiBbs/wZfXaxhBbTom+NAltWgJRJ9L1YE2P2rfM15gyLsEuU oIbVt1SPxl0ZAsQ8Rid2iSExArDEAF+MVp7++ClfGg51OZJ8kUJJ46EnJlo5oJSDrws8R2g04rgkO Xpzl3FflW2SAqWcu6q/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFBJd-009wlf-1R; Mon, 18 Dec 2023 10:57:41 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFBJQ-009wav-1N for linux-arm-kernel@lists.infradead.org; Mon, 18 Dec 2023 10:57:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1702897048; x=1734433048; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LF02UyNK/xpkLqe9tr31YIzv+kTaNRG9vqb7cPz4ldI=; b=PujiWEdUo7x+KHBTp+bqG2GdGM7t2mV0Nd4xtMbwDZ/gxiPZXJBZzOgy TkZHQi+WSIdUBmHYDHEHLeebxavPdHttwaBMbAaYPSLssbFiK8Y8CMdP3 /7SrfuYE7L6kMV6eT/rSZ7wSveTbmM/bt2i7oJXpw98eBNiPfScUMi01j 7igO/92tJEm9vr7EL4vndL3hScjTkEbYA+W6R95cbILM6yBnljOV5q4Zh IvFppxDOnQw8pk68LdEFt1JSvVYZuyxJ8AdnKA1iGNEIBmEHRjIE7jsSV Dk3MNH2cjw0970CsFOPADCu1qvtVgKgwgYVeqyacwl/youI5mE8o9vuKA g==; X-IronPort-AV: E=Sophos;i="6.04,285,1695679200"; d="scan'208";a="34559834" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Dec 2023 11:57:22 +0100 Received: from steina-w.tq-net.de (steina-w.tq-net.de [10.123.53.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 24E1F280084; Mon, 18 Dec 2023 11:57:22 +0100 (CET) From: Alexander Stein To: Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/6] drm/bridge: dpu-dprc: Use dev_err_probe Date: Mon, 18 Dec 2023 11:57:17 +0100 Message-Id: <20231218105718.2445136-6-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218105718.2445136-1-alexander.stein@ew.tq-group.com> References: <20231218105718.2445136-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_025728_786498_DC00B340 X-CRM114-Status: GOOD ( 11.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This simplifies the code and gives additional information upon deferral. Signed-off-by: Alexander Stein --- drivers/gpu/drm/imx/dpu/dpu-dprc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/imx/dpu/dpu-dprc.c b/drivers/gpu/drm/imx/dpu/dpu-dprc.c index 261c9566721e..6467ad960080 100644 --- a/drivers/gpu/drm/imx/dpu/dpu-dprc.c +++ b/drivers/gpu/drm/imx/dpu/dpu-dprc.c @@ -612,7 +612,8 @@ static int dpu_dprc_probe(struct platform_device *pdev) dprc->prgs[i] = dpu_prg_lookup_by_phandle(dev, "fsl,prgs", i); if (!dprc->prgs[i]) - return -EPROBE_DEFER; + return dev_err_probe(dev, -EPROBE_DEFER, + "Failed to lookup fsl,prgs\n"); if (i == 1) dpu_prg_set_auxiliary(dprc->prgs[i]); @@ -623,11 +624,10 @@ static int dpu_dprc_probe(struct platform_device *pdev) ret = devm_request_irq(dev, wrap_irq, dpu_dprc_wrap_irq_handler, IRQF_SHARED, dev_name(dev), dprc); - if (ret < 0) { - dev_err(dev, "failed to request dpr_wrap irq(%u): %d\n", - wrap_irq, ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, + "failed to request dpr_wrap irq(%u)\n", + wrap_irq); platform_set_drvdata(pdev, dprc);