From 0d3dbeb8142a92bb571c74b4e78f326b742fea64 Mon Sep 17 00:00:00 2001 From: Cai Huoqing Date: Fri, 17 Sep 2021 12:24:13 +0800 Subject: video: fbdev: omapfb: panel-tpo-td043mtea1: Make use of the helper function dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing Signed-off-by: Helge Deller --- drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c index afac1d9445aa..3db0232c31ab 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c @@ -517,8 +517,7 @@ static int tpo_td043_probe(struct spi_device *spi) ddata->vcc_reg = devm_regulator_get(&spi->dev, "vcc"); if (IS_ERR(ddata->vcc_reg)) { - dev_err(&spi->dev, "failed to get LCD VCC regulator\n"); - r = PTR_ERR(ddata->vcc_reg); + r = dev_err_probe(&spi->dev, r, "failed to get LCD VCC regulator\n"); goto err_regulator; } -- cgit v1.2.3-70-g09d2