From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426143AbdDUWPI (ORCPT ); Fri, 21 Apr 2017 18:15:08 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:44923 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422832AbdDUWPD (ORCPT ); Fri, 21 Apr 2017 18:15:03 -0400 X-IronPort-AV: E=Sophos;i="5.37,231,1488841200"; d="scan'208";a="221138021" Date: Sat, 22 Apr 2017 00:14:57 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Simon Ho cc: Takashi Iwai , alsa-devel@alsa-project.org, Liam Girdwood , Jaroslav Kysela , Mark Brown , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I don't think the patch is correct, so I haven't bothered signing off on it. Probably the & is not correct in the IS_ERR call? julia ---------- Forwarded message ---------- Date: Sat, 22 Apr 2017 06:09:26 +0800 From: kbuild test robot To: kbuild@01.org Cc: Julia Lawall Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Simon Ho Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/cx2072x.c +++ b/sound/soc/codecs/cx2072x.c @@ -2183,7 +2183,7 @@ static int cx2072x_i2c_probe(struct i2c_ &cx2072x_regmap); if (IS_ERR(&cx2072x->regmap)) { - ret = PTR_ERR(cx2072x->regmap); + ret = PTR_ERR(&cx2072x->regmap); dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret); return ret; }