diff mbox

[OPW,kernel] staging: drm/imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

Message ID 1382513395-23429-1-git-send-email-valentina.manea.m@gmail.com
State New, archived
Headers show

Commit Message

Valentina Manea Oct. 23, 2013, 7:29 a.m. UTC
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>
---
 drivers/staging/imx-drm/imx-ldb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Rusty Russell Oct. 24, 2013, 2:32 a.m. UTC | #1
Valentina Manea <valentina.manea.m@gmail.com> writes:
> 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>

Thanks,
Rusty.

> ---
>  drivers/staging/imx-drm/imx-ldb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
> index af733ea..16817d3 100644
> --- a/drivers/staging/imx-drm/imx-ldb.c
> +++ b/drivers/staging/imx-drm/imx-ldb.c
> @@ -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)
> -- 
> 1.8.1.2
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
index af733ea..16817d3 100644
--- a/drivers/staging/imx-drm/imx-ldb.c
+++ b/drivers/staging/imx-drm/imx-ldb.c
@@ -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)