Skip to content

Commit

Permalink
omapfb: encoder-tpd12s015: fix error return code
Browse files Browse the repository at this point in the history
Return an error code on failure.

Problem found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  • Loading branch information
Julia Lawall authored and Bartlomiej Zolnierkiewicz committed Jul 3, 2018
1 parent ace6033 commit 365da08
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,22 +240,28 @@ static int tpd_probe(struct platform_device *pdev)

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;

Expand Down

0 comments on commit 365da08

Please sign in to comment.