diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-03-18 15:18:10 +0100 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2018-03-28 23:30:31 +0200 |
commit | fca10453cf51a34ddd0e6bf9c509cdabaa3d1f85 (patch) | |
tree | d5839d77d435584a4e1f3082fead690de044817a /drivers/video | |
parent | e56a713eac9ae18305e2c6d99cbd5887f256d91a (diff) | |
download | u-boot-fca10453cf51a34ddd0e6bf9c509cdabaa3d1f85.tar.gz |
video: rk3399_mipi: correct error checking
Pointers are never negative. Use macro IS_ERR() for checking.
cf. rk3288_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/rk3399_mipi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c index 9ef202bf09..c6987ff042 100644 --- a/drivers/video/rockchip/rk3399_mipi.c +++ b/drivers/video/rockchip/rk3399_mipi.c @@ -128,7 +128,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 (priv->grf <= 0) { + if (!priv->grf || IS_ERR(priv->grf)) { debug("%s: Get syscon grf failed (ret=%p)\n", __func__, priv->grf); return -ENXIO; |