From: Julia Lawall Subject: [PATCH] ASoC: sun4i-i2s: fix odd_ptr_err.cocci warnings Date: Tue, 4 Oct 2016 18:23:24 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by alsa0.perex.cz (Postfix) with ESMTP id E00B6266E84 for ; Tue, 4 Oct 2016 18:23:36 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: =?ISO-8859-15?Q?Myl=E8ne_Josserand?= Cc: alsa-devel@alsa-project.org, Wei Yongjun , Liam Girdwood , Takashi Iwai , Chen-Yu Tsai , Mark Brown , kbuild-all@01.org, Maxime Ripard List-Id: alsa-devel@alsa-project.org sound/soc/sunxi/sun4i-i2s.c:633:5-11: inconsistent IS_ERR and PTR_ERR on line 635. PTR_ERR should normally access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! sun4i-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -632,7 +632,7 @@ static int sun4i_i2s_probe(struct platfo reset_apb = devm_reset_control_get(&pdev->dev, "apb_reset"); if (IS_ERR(reset_apb)) { dev_err(&pdev->dev, "Can't get apb reset\n"); - return PTR_ERR(i2s->mod_clk); + return PTR_ERR(reset_apb); } ret = reset_control_deassert(reset_apb);