video: rk3288_mipi: Combine NULL check into IS_ERR_OR_NULL()
authorPunit Agrawal <punit.agrawal@arm.com>
Mon, 19 Mar 2018 17:36:07 +0000 (17:36 +0000)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Wed, 28 Mar 2018 21:44:58 +0000 (23:44 +0200)
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/video/rockchip/rk3288_mipi.c

index 27d125f77e3b8660d759988731d20bb23e17fc65..a7fa9c5110eb982e26cfa8eb5757518cec171f0c 100644 (file)
@@ -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 (!priv->grf || IS_ERR(priv->grf)) {
+       if (IS_ERR_OR_NULL(priv->grf)) {
                debug("%s: Get syscon grf failed (ret=%p)\n",
                      __func__, priv->grf);
                return  -ENXIO;