Skip to content

Commit 61a8588

Browse files
Zhang Enpeithierryreding
authored andcommitted
drm/tegra: dpaux: Use dev_err_probe()
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> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn
1 parent 4054a30 commit 61a8588

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

drivers/gpu/drm/tegra/dpaux.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,14 +501,9 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
501501

502502
dpaux->vdd = devm_regulator_get_optional(&pdev->dev, "vdd");
503503
if (IS_ERR(dpaux->vdd)) {
504-
if (PTR_ERR(dpaux->vdd) != -ENODEV) {
505-
if (PTR_ERR(dpaux->vdd) != -EPROBE_DEFER)
506-
dev_err(&pdev->dev,
507-
"failed to get VDD supply: %ld\n",
508-
PTR_ERR(dpaux->vdd));
509-
510-
return PTR_ERR(dpaux->vdd);
511-
}
504+
if (PTR_ERR(dpaux->vdd) != -ENODEV)
505+
return dev_err_probe(&pdev->dev, PTR_ERR(dpaux->vdd),
506+
"failed to get VDD supply\n");
512507

513508
dpaux->vdd = NULL;
514509
}

0 commit comments

Comments
 (0)