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>
This commit is contained in:
Cai Huoqing 2021-09-17 12:24:13 +08:00 committed by Helge Deller
parent 7ebf85c5b1
commit 0d3dbeb814
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}