From patchwork Fri Nov 30 17:43:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1006113 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lip6.fr Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4361wJ1mFpz9s89 for ; Sat, 1 Dec 2018 04:44:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbeLAEyB (ORCPT ); Fri, 30 Nov 2018 23:54:01 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:57853 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbeLAEyA (ORCPT ); Fri, 30 Nov 2018 23:54:00 -0500 X-IronPort-AV: E=Sophos;i="5.56,299,1539640800"; d="scan'208";a="287454573" Received: from ridgemount65.plus.com (HELO hadrien) ([81.174.143.209]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2018 18:43:56 +0100 Date: Fri, 30 Nov 2018 17:43:56 +0000 (GMT) From: Julia Lawall X-X-Sender: jll@hadrien To: Linus Walleij cc: linux-gpio@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] regulator: s5m8767: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: kbuild test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: fbc2a5f2f68f ("regulator: s5m8767: Let core handle GPIO descriptors") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- I have absolutely no idea whether this is a correct patch, since not much context is shown. I'm just forwarding it in case it is useful. tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-regulator-fixup head: efc08549a219debb5c641739ca0f01af97fd0f64 commit: fbc2a5f2f68f0a0f8bdac6880849d9a112c29184 [10/11] regulator: s5m8767: Let core handle GPIO descriptors :::::: branch date: 2 hours ago :::::: commit date: 2 hours ago Please take the patch only if it's a positive warning. Thanks! s5m8767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -608,7 +608,7 @@ static int s5m8767_pmic_dt_parse_pdata(s "s5m8767"); if (IS_ERR(gpiod)) { devres_free(dr); - return PTR_ERR(rdata->ext_control_gpiod); + return PTR_ERR(gpiod); } *dr = gpiod; devres_add(&pdev->dev, dr);