summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-03-18 15:25:41 +0100
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-03-28 23:44:58 +0200
commit0ea91c3240bdb32b901a3c0639d35ab559b675db (patch)
tree2d0f39be13a6c1aa5a6c8abc9f8323418ec316f6 /drivers/video
parenta89c725d2c6082e42be2ff59a48c967974ead77f (diff)
video: rk3288_mipi: check in rk_mipi_ofdata_to_platdata
The error checking should also catch the case that no range has beeen defined. syscon_get_first_range() returns NULL if no range is defined. cf. rk3399_mipi.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/rockchip/rk3288_mipi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index 953b47fb8c8..27d125f77e3 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -136,7 +136,7 @@ static int rk_mipi_ofdata_to_platdata(struct udevice *dev)
struct rk_mipi_priv *priv = dev_get_priv(dev);
priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
- if (IS_ERR(priv->grf)) {
+ if (!priv->grf || IS_ERR(priv->grf)) {
debug("%s: Get syscon grf failed (ret=%p)\n",
__func__, priv->grf);
return -ENXIO;