diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-17 12:24:13 +0800 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-01-29 23:22:01 +0100 |
commit | 0d3dbeb8142a92bb571c74b4e78f326b742fea64 (patch) | |
tree | 2bcef548ec3d3c3551bcc3b6dc464eab8b54c39b /drivers/video | |
parent | 7ebf85c5b104b6e7d43dd9c729109e806fcdb657 (diff) |
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 <caihuoqing@baidu.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |