[9610] fbdev: dpu: 'ret' value is initialized
authorhwangjae lee <hj-yo.lee@samsung.com>
Wed, 10 Oct 2018 11:23:18 +0000 (20:23 +0900)
committerhskang <hs1218.kang@samsung.com>
Thu, 11 Oct 2018 01:58:46 +0000 (10:58 +0900)
In decon_init_resource(), 'ret' value is initialzed.
prevent defect 233996.

Change-Id: I7e50ebc470bd3e6e5ced40fe4fae5778f6644b00
Signed-off-by: hwangjae lee <hj-yo.lee@samsung.com>
drivers/video/fbdev/exynos/dpu20/decon_core.c

index a34b90f0f6f9bb5850b1ccfb8c13ef89a545ca2e..92304612039a9e134a35227d158adf59728723d6 100644 (file)
@@ -3517,7 +3517,7 @@ static int decon_init_resources(struct decon_device *decon,
                struct platform_device *pdev, char *name)
 {
        struct resource *res;
-       int ret;
+       int ret = 0;
 
        /* Get memory resource and map SFR region. */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -3558,6 +3558,7 @@ static int decon_init_resources(struct decon_device *decon,
        decon->res.ss_regs = dpu_get_sysreg_addr();
        if (IS_ERR_OR_NULL(decon->res.ss_regs)) {
                decon_err("failed to get sysreg addr\n");
+               ret = -EINVAL;
                goto err;
        }