Commit 61a85887 authored by Zhang Enpei's avatar Zhang Enpei Committed by Thierry Reding
Browse files

drm/tegra: dpaux: Use dev_err_probe()



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

Signed-off-by: default avatarZhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: default avatarShao Mingyin <shao.mingyin@zte.com.cn>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn
parent 4054a307
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -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;
	}