Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3929543rwb; Sun, 30 Jul 2023 20:25:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlErd69sTpBlaqOw+zPu+NmYjaVFEZmfhEB1q1zrtljDAo04HGirmqdiQY1rv1kE+Cb/czEd X-Received: by 2002:a17:902:f683:b0:1bb:1494:f7f7 with SMTP id l3-20020a170902f68300b001bb1494f7f7mr11335345plg.23.1690773932474; Sun, 30 Jul 2023 20:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690773932; cv=none; d=google.com; s=arc-20160816; b=f9t+GKODXOhmzh3Fqmjs5qQVfoqakHCLzBegtfYN9EksUO1RMPdqN230Pt1w8hGalt aXmIbYlTIqoMcM10t3lghrGrCC3xArvs6gLmF7OnoiWpyh5b4SO9YL0EFn2/vgcS+ikW cGpWWw13oShrmXHqmfpGIgZnr6oKYmIz7/ZFao6OZNdKXt5Wd5GoIQAUXgV1L8yBAW6D WkyfP4OWe0nAmkCSPu17KXI241cTp2Uc9I4EUMJHT9IgWqXETqYNGNTP5xYnmn5O86CU TK5qrDuS6og9i/yzZ07+g8WhESIpcrwrMQjBxpyUUN6sKGszV5gnB0WGohHNGxe8NSj9 56dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lLnxhTOK8CR7EOKXVMtGvf6ZSiJOcPXDQqy3TBSI8eI=; fh=STSbrAKVnrUMtCWRto2IYglOscOCUn3sRwHnq5HhtII=; b=IrttOnF6CZUFHW+JChxn5UMlONlhVN5kX+oS3aYdclxsUsZLxJjW4nvq36AdfTmGB1 1Ql84x/GpfeR6DLnA2GOHuVdzVxYhDdkobyGp3Tz1ZY+JEqSvlNXRhlRRkHmRWjVj0tL EoUqxLiL7Df3Nn7xCFDgbDMgZA1YQ5OMkh26KUEIx7hajRvStstCgLINiIyWoJHGh+0w sB5iUApZPGio8bwXpoSC+sK04qPoZ/ibEQq5/LtwgcYiLdFVcjjHXktqLjTiirbRsHz0 5pAMDaOQ/LrZRaC5ulZMFK47bcV7kFM207MhzuQVTJk8PrNChLBLOv3767lgrCIkY7mQ NrRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="fBWuJ/VA"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020a17090311c900b001b9e9edea43si5439835plh.552.2023.07.30.20.25.22; Sun, 30 Jul 2023 20:25:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="fBWuJ/VA"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229542AbjGaCqG (ORCPT + 59 others); Sun, 30 Jul 2023 22:46:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjGaCqF (ORCPT ); Sun, 30 Jul 2023 22:46:05 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47F96E45; Sun, 30 Jul 2023 19:46:04 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6b9defb36a2so3687555a34.2; Sun, 30 Jul 2023 19:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690771563; x=1691376363; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lLnxhTOK8CR7EOKXVMtGvf6ZSiJOcPXDQqy3TBSI8eI=; b=fBWuJ/VArlePTzAu+Lv1gqnlPm1ITSafKrNAnGpysA0wqm5h+7D28oOsXmzHfQteCo O3gq/1b1LaWqVu0Iq8Z1hBFo97dQQkyf8rPeoYBwT9pCQ+9LSFSCGzTxcIHXmwawqLZ6 2jMnKnKGwWltp0uBK1kBYf5TUMDex7bpwzMF9OkbcWZoU4UOHGayozhDgvub93GChaf9 2Bc/NesvHzpTquzJev3zGxoYOfP7nrE2w1N+dcFAflHCEDqmxpC9VUc7poptzT9m/2v8 +DEnp9f6nM/mZrzjFYzERwxXXJV9WOd1FWxZ5vutlN/TtOTA1O3ofTMYDyILNdEm2/rr OUFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690771563; x=1691376363; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lLnxhTOK8CR7EOKXVMtGvf6ZSiJOcPXDQqy3TBSI8eI=; b=lLq5KnW9eW5Exem717fG0vtMM9zm0u0vfo3wj4ahCN6C1f/imlsH7fzRIlT6/zOmYU VApn/aghctzIQ2OnfzTRaBggMPtjzUl3qmE3M/shRK+EA0HcIxYRAasQZM7IkBbC6rBI wl7ML3ijJ1KGr5HQTbOUqOEfkLcDTehfvCBqNHCyJtcDwJpCaTJ3gpB6+nLAI3RIoKdx AOe3yfZXyuvz+vQfAf6DPkkzZJNbphIT6SiP0VMr/ZXF4ZpsUXMBSbHRJ8gyRnDFq+C2 df8sZY/u4huU3Ut0AM7R9b9Hn38OS7g0vr88EYlhmkFBwbCOT3HcWHLV76RuyO9wkZWd j9Bw== X-Gm-Message-State: ABy/qLZsov7pHgCd+blEcDVPSjDfz0LTfsl4Bc91gqmfwkKOi7N4wIpS Gd4GNyu2V8Vd2zq1VFagCVaXws2NyrS57hOm X-Received: by 2002:a05:6358:249f:b0:135:515c:38ee with SMTP id m31-20020a056358249f00b00135515c38eemr9782752rwc.25.1690771563460; Sun, 30 Jul 2023 19:46:03 -0700 (PDT) Received: from rajgad.hsd1.ca.comcast.net ([2601:204:df00:9cd0:f50b:8f24:acc4:e5c]) by smtp.gmail.com with ESMTPSA id q1-20020a63d601000000b0055be951145csm7045301pgg.36.2023.07.30.19.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 19:46:03 -0700 (PDT) From: Atul Raut To: kvalo@kernel.org Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH] ath6kl: Fix debugfs_create_dir error checking Date: Sun, 30 Jul 2023 19:45:42 -0700 Message-Id: <20230731024542.27248-1-rauji.raut@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The debugfs_create_dir function returns ERR_PTR in case of error and the correct way to check an error is 'IS_ERR' inline function. This patch will replace the null-comparison with IS_ERR This issue was found with the help of Coccinelle. ./drivers/net/wireless/ath/ath6kl/debug.c:1796:6-21: Wrong debugfs call error processing on line 1796 Signed-off-by: Atul Raut --- drivers/net/wireless/ath/ath6kl/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 433a047f3747..505af195e299 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -1793,7 +1793,7 @@ int ath6kl_debug_init_fs(struct ath6kl *ar) { ar->debugfs_phy = debugfs_create_dir("ath6kl", ar->wiphy->debugfsdir); - if (!ar->debugfs_phy) + if (IS_ERR(ar->debugfs_phy)) return -ENOMEM; debugfs_create_file("tgt_stats", 0400, ar->debugfs_phy, ar, -- 2.34.1