From patchwork Thu Feb 20 14:43:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1241461 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=inria.fr Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Ncm65fnQz9sRs for ; Fri, 21 Feb 2020 01:43:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1F06285F93; Thu, 20 Feb 2020 14:43:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fLykzU8yPSp8; Thu, 20 Feb 2020 14:43:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7757085F83; Thu, 20 Feb 2020 14:43:46 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AC4C71BF2B0 for ; Thu, 20 Feb 2020 14:43:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A489E87CEE for ; Thu, 20 Feb 2020 14:43:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id esHQ0Rln7psH for ; Thu, 20 Feb 2020 14:43:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by hemlock.osuosl.org (Postfix) with ESMTPS id 19ADB87CE1 for ; Thu, 20 Feb 2020 14:43:43 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.70,464,1574118000"; d="scan'208";a="339864857" Received: from unknown (HELO hadrien) ([132.227.124.212]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 15:43:40 +0100 Date: Thu, 20 Feb 2020 15:43:40 +0100 (CET) From: Julia Lawall X-X-Sender: julia@hadrien To: Jack Ping CHNG Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Amireddy Mallikarjuna reddy Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: kbuild test robot PTR_ERR should typically access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 69fab0a67a95 ("gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver") CC: Jack Ping CHNG Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- Maybe the code is correct, but just unnecessarily obscure. tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue head: 7a6fc7fc71cf6316739b60fcffdb86e0c43f99b5 commit: 69fab0a67a95208a25af95de20a0301298ee23f6 [43/47] gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver :::::: branch date: 9 hours ago :::::: commit date: 9 hours ago gswip_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c +++ b/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c @@ -96,7 +96,7 @@ static int np_gswip_parse_dt(struct plat pdata->sw_clk = devm_clk_get(dev, "switch"); if (IS_ERR(pdata->sw_clk)) - return PTR_ERR(priv->pdata.sw_clk); + return PTR_ERR(pdata->sw_clk); for_each_node_by_name(node, GSWIP_MAC_DEV_NAME) { priv->num_subdev_mac++;