gpu: ipu-v3: Return proper error on ipu_add_client_devices error path
authorAxel Lin <axel.lin@ingics.com>
Sun, 3 Aug 2014 02:38:18 +0000 (10:38 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 2 Sep 2014 08:43:15 +0000 (10:43 +0200)
Avoid returning an uninitialized variable in the error path.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-common.c

index 04e7b2eafbdd7b127fd540873cd334693f4f4d40..e340bebd34199b9965c055674cc67920caae9105 100644 (file)
@@ -1116,8 +1116,10 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
                                id++, &reg->pdata, sizeof(reg->pdata));
                }
 
-               if (IS_ERR(pdev))
+               if (IS_ERR(pdev)) {
+                       ret = PTR_ERR(pdev);
                        goto err_register;
+               }
        }
 
        return 0;