diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-22 11:11:07 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-12-08 14:42:58 +0300 |
commit | 5c2a392d574231793a156bff4d4391b3c1ba11c5 (patch) | |
tree | fac871638cc6235a1fc478341e21084adf3cf00a /drivers/gpu | |
parent | e43f2c3395fd36ec9f8d069af07bcd3eae5fde17 (diff) | |
download | linux-5c2a392d574231793a156bff4d4391b3c1ba11c5.tar.xz |
drm/omap: tpd12s015: fix error handling
tpd12s015 driver is missing error value handling for gpio
initialization, causing 0 to be returned as an error if gpiod_get_*
fails. This may cause deferred probing to fail.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index 6d8f79b29af6..58276a48112e 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c @@ -234,25 +234,30 @@ static int tpd_probe(struct platform_device *pdev) if (r) return r; - gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0, GPIOD_OUT_LOW); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->ct_cp_hpd_gpio = gpio; gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1, GPIOD_OUT_LOW); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->ls_oe_gpio = gpio; gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2, GPIOD_IN); - if (IS_ERR(gpio)) + if (IS_ERR(gpio)) { + r = PTR_ERR(gpio); goto err_gpio; + } ddata->hpd_gpio = gpio; |