aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>2014-09-02 08:51:21 -0400
committerDave Airlie <airlied@redhat.com>2014-09-16 20:55:19 -0400
commit12778fc14301cf24d79cd89b0129874c319d0a38 (patch)
treea9a8bbdf466ac6394dc603eace7a069145460dc9
parent18c44db8cafe9bda4fcb51bfc05c1f1d7cefc44c (diff)
drm/tilcdc: panel: Set return value explicitly
Instead of setting an initial value for the return code, set it explicitly on each error path. This is just a cosmetic cleanup, as preparation for the enable GPIO support. Tested-by: Darren Etheridge <detheridge@ti.com> Tested-by: Johannes Pointner <johannes.pointner@br-automation.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_panel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 3dcf08e4dc91..f2a5b23782fa 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -346,7 +346,7 @@ static int panel_probe(struct platform_device *pdev)
346 struct panel_module *panel_mod; 346 struct panel_module *panel_mod;
347 struct tilcdc_module *mod; 347 struct tilcdc_module *mod;
348 struct pinctrl *pinctrl; 348 struct pinctrl *pinctrl;
349 int ret = -EINVAL; 349 int ret;
350 350
351 /* bail out early if no DT data: */ 351 /* bail out early if no DT data: */
352 if (!node) { 352 if (!node) {
@@ -381,12 +381,14 @@ static int panel_probe(struct platform_device *pdev)
381 panel_mod->timings = of_get_display_timings(node); 381 panel_mod->timings = of_get_display_timings(node);
382 if (!panel_mod->timings) { 382 if (!panel_mod->timings) {
383 dev_err(&pdev->dev, "could not get panel timings\n"); 383 dev_err(&pdev->dev, "could not get panel timings\n");
384 ret = -EINVAL;
384 goto fail_free; 385 goto fail_free;
385 } 386 }
386 387
387 panel_mod->info = of_get_panel_info(node); 388 panel_mod->info = of_get_panel_info(node);
388 if (!panel_mod->info) { 389 if (!panel_mod->info) {
389 dev_err(&pdev->dev, "could not get panel info\n"); 390 dev_err(&pdev->dev, "could not get panel info\n");
391 ret = -EINVAL;
390 goto fail_timings; 392 goto fail_timings;
391 } 393 }
392 394