summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-08-03 10:38:18 +0800
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-09-02 10:43:15 +0200
commite4946cdcabcffd4814e153e71d28884b94c65e9e (patch)
treed6154c0f51991d5a942fcc0a811781da2966e274 /drivers/gpu
parentb6c044a3d881c1b01fe0220ad76e548ea5d79b1c (diff)
downloadlinux-e4946cdcabcffd4814e153e71d28884b94c65e9e.tar.gz
linux-e4946cdcabcffd4814e153e71d28884b94c65e9e.tar.bz2
linux-e4946cdcabcffd4814e153e71d28884b94c65e9e.zip
gpu: ipu-v3: Return proper error on ipu_add_client_devices error path
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 04e7b2eafbdd..e340bebd3419 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -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;