From: Ezequiel Garcia Date: Tue, 2 Sep 2014 12:51:21 +0000 (-0300) Subject: drm/tilcdc: panel: Set return value explicitly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12778fc14301cf24d79cd89b0129874c319d0a38;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Johannes Pointner Signed-off-by: Ezequiel Garcia Signed-off-by: Dave Airlie --- 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) struct panel_module *panel_mod; struct tilcdc_module *mod; struct pinctrl *pinctrl; - int ret = -EINVAL; + int ret; /* bail out early if no DT data: */ if (!node) { @@ -381,12 +381,14 @@ static int panel_probe(struct platform_device *pdev) panel_mod->timings = of_get_display_timings(node); if (!panel_mod->timings) { dev_err(&pdev->dev, "could not get panel timings\n"); + ret = -EINVAL; goto fail_free; } panel_mod->info = of_get_panel_info(node); if (!panel_mod->info) { dev_err(&pdev->dev, "could not get panel info\n"); + ret = -EINVAL; goto fail_timings; }