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>
@@ -1116,8 +1116,10 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
id++, ®->pdata, sizeof(reg->pdata));
}
- if (IS_ERR(pdev))
+ if (IS_ERR(pdev)) {
+ ret = PTR_ERR(pdev);
goto err_register;
+ }
return 0;