staging: drm/imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
authorValentina Manea <valentina.manea.m@gmail.com>
Wed, 23 Oct 2013 07:29:55 +0000 (10:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2013 03:30:27 +0000 (20:30 -0700)
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/imx-ldb.c

index 926f493..654bf03 100644 (file)
@@ -359,10 +359,8 @@ static int imx_ldb_get_clk(struct imx_ldb *ldb, int chno)
 
        sprintf(clkname, "di%d_pll", chno);
        ldb->clk_pll[chno] = devm_clk_get(ldb->dev, clkname);
-       if (IS_ERR(ldb->clk_pll[chno]))
-               return PTR_ERR(ldb->clk_pll[chno]);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(ldb->clk_pll[chno]);
 }
 
 static int imx_ldb_register(struct imx_ldb_channel *imx_ldb_ch)