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 <[email protected]> Signed-off-by: Shao Mingyin <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4054a30 commit 61a8588

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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)