mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <shao.mingyin@zte.com.cn>
To: <thierry.reding@gmail.com>, <laurent.pinchart@ideasonboard.com>
Cc: <mperttunen@nvidia.com>, <airlied@gmail.com>, <simona@ffwll.ch>,
	<jonathanh@nvidia.com>, <dri-devel@lists.freedesktop.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<tomi.valkeinen@ideasonboard.com>,
	<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
	<tzimmermann@suse.de>, <michal.simek@amd.com>,
	<linux-arm-kernel@lists.infradead.org>, <yang.yang29@zte.com.cn>,
	<xu.xin16@zte.com.cn>, <ye.xingchen@zte.com.cn>,
	<zhang.enpei@zte.com.cn>
Subject: [PATCH linux-next 1/2] gpu: drm: tegra: dpaux: Use dev_err_probe()
Date: Wed, 2 Apr 2025 19:37:58 +0800 (CST)	[thread overview]
Message-ID: <20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn> (raw)
In-Reply-To: <20250402193656279azy9TKahAE5TQ5-i4XCQT@zte.com.cn>

From: Zhang Enpei <zhang.enpei@zte.com.cn>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
 drivers/gpu/drm/tegra/dpaux.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 2cd8dcb959c0..e5297ac5c0fc 100644
--- a/drivers/gpu/drm/tegra/dpaux.c
+++ b/drivers/gpu/drm/tegra/dpaux.c
@@ -501,14 +501,9 @@ static int tegra_dpaux_probe(struct platform_device *pdev)

 	dpaux->vdd = devm_regulator_get_optional(&pdev->dev, "vdd");
 	if (IS_ERR(dpaux->vdd)) {
-		if (PTR_ERR(dpaux->vdd) != -ENODEV) {
-			if (PTR_ERR(dpaux->vdd) != -EPROBE_DEFER)
-				dev_err(&pdev->dev,
-					"failed to get VDD supply: %ld\n",
-					PTR_ERR(dpaux->vdd));
-
-			return PTR_ERR(dpaux->vdd);
-		}
+		if (PTR_ERR(dpaux->vdd) != -ENODEV)
+			return dev_err_probe(&pdev->dev, PTR_ERR(dpaux->vdd),
+					     "failed to get VDD supply\n");

 		dpaux->vdd = NULL;
 	}
-- 
2.25.1

  reply	other threads:[~2025-04-02 11:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 11:36 [PATCH linux-next 0/2] Use dev_err_probe() in gpu shao.mingyin
2025-04-02 11:37 ` shao.mingyin [this message]
2025-05-07 15:44   ` [PATCH linux-next 1/2] gpu: drm: tegra: dpaux: Use dev_err_probe() Thierry Reding
2025-04-02 11:38 ` [PATCH linux-next 2/2] gpu: drm: xlnx: zynqmp_dp: " shao.mingyin
2025-04-02 12:49   ` Laurent Pinchart
2025-04-16 11:42   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn \
    --to=shao.mingyin@zte.com.cn \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mperttunen@nvidia.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zhang.enpei@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®