From patchwork Wed Jul 12 11:47:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Minjie Du X-Patchwork-Id: 13310202 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC7F4EB64DD for ; Wed, 12 Jul 2023 11:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233357AbjGLLtR (ORCPT ); Wed, 12 Jul 2023 07:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233352AbjGLLs7 (ORCPT ); Wed, 12 Jul 2023 07:48:59 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2113.outbound.protection.outlook.com [40.107.255.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F1261BFE; Wed, 12 Jul 2023 04:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dl98D57hJ/5T88oDFw7XmnopbiCK5MM/HA7xhzDdHA03f+7HNxuNlzn1j6GmGsrRY+tF8q+7vBBVynb3pGxjPjc1Tx1n9uZyl93uubz6xw7ohpUJLV66RzgUPQrBXn9TChNtA7biZxP1dHi69Y7YSplRIXNCznYXWfquOoS4+T+TNIrPU7LAKnvuJlQma1xskyI/rkgbcwY/NFeuwnJS2/gW2f6NyCtu/UdltBMDcc1TW4ZpTr3vK0tCBXGFolc2gGE6aQypjrU0U8ZeShMFPb0tq3rLs5tnDPWkxqxNsuJapKuoPEucLvAjcj2hUqltRSY075KO5HZv/O1D6jgT6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RIwbIWF8cEM+VgOSMueWzfiWGwvQNR3AxgeuwoxzVWw=; b=k0unNuWXmnge7j4/ycby8bxEFxXpqUIRKdbMVLx6/cyMdFTof/mNjKbh1QKcY2vkV/9W0YFsAiEJH+tQVJETpB1v55u7LkenAwvLypvEeWVrKcSXlEbbQ5Rdb0vueu3T5w1kbG/lSsI6ofz2gtqk401flTV/pqeQVpt0mTS3VwfdlCQqQgt7bPggCWhe6ZAze/MDPkIbNA+eglOdP+7khcHOb2IXSLtBuIrnNppla2srfE/7Tkfgnh0UkpOpk5//VwVhF0/5JGMj43Can7YDAFgE/1GpCiN+zvQtxqOUi1Z2VDEDSlxYzVbqsH+GUQlV2WXQLH/nGs0RgUBHDZw5kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RIwbIWF8cEM+VgOSMueWzfiWGwvQNR3AxgeuwoxzVWw=; b=Rnl12+Kqn+2rEbvRgVQhx63/GswOoqhM8c9VV9+uLkaDWtfD73VrKb4sOX8LWaNHApTfZgk8bYbL7Tz1vb4cngW2vHPoXh4Au/8JB+8HdeH4LGgOyl37sFFJM+jqDv9TgormEXl4vK1lGNvz218+ezlpBH6PmW00klu9C354XuyE0XHd985IAF/D9MOfvjAF11v0Prbxaay8nteNZoqBliKPJEvVInOvFPBQKcaDpFIP5qRzYxM3n2OsPEwkRE7/zZ61xdxm6TWnLbV/b7B6MSGd2y/x/WH8RHv4jsyT/L1Bft+8hu9ohybK0bjPOS0AifeeZgOy/tqtFTr+Qn9qjA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) by SI2PR06MB4537.apcprd06.prod.outlook.com (2603:1096:4:153::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 11:47:56 +0000 Received: from SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a]) by SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a%6]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 11:47:56 +0000 From: Minjie Du To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , linux-wireless@vger.kernel.org (open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v1] net: wireless: ath9k: fix parameter check in ath9k_init_debug() Date: Wed, 12 Jul 2023 19:47:40 +0800 Message-Id: <20230712114740.13226-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|SI2PR06MB4537:EE_ X-MS-Office365-Filtering-Correlation-Id: 668a583d-cb47-4298-f936-08db82cdd513 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vZ06optc2JmWx8v2s+wik1I6zfHg+Llq/0qEAFSF+Yf3VmyDMQ42T6uk5q5VvS5Cy+nDCSVHDPoH+gtIRVh5rP8seIHFMK0tz3plPknj/iBcq9vIeAX9AUIW52nJUyZKw60MRHZBmgwnfymrTHpyD5nwqMqOed9ijnP1WG0BRoLvpC+rPdDuXvvUTi3UAADkv3TdW6v8OMXGxw584cLQZXBaMas7nRSogbXWnQUNwBEpAkgMSSMsDJo5DpgDSaL5G805uyLWstGYC7j7+BbWR5D2g0+U+P4jAlJugHbG/CQKC5k+NLlUBNgGY4Kkz90eRMkkPwirtz0VNkHsVSyyKzwappINmVRQtY4FV8q+MqlqHOr+YOA0X9qcdtWmgAdJ5F4KeRwLHXFf6Rp4kVSNqWbjaa7CI5uwFuBd8jdpFh2baHYgBJpXyckXqStJjnAftdSOwPqckqxKuVBEiplm3KVKgvTkjfTjBqTZfOzePB9UL6nn9If7r6bDSq7+5A18fdyZ3f9SgKWa39EfYHTwnDabJXnVkCFKfvSgEkf7VsemMpRaexLFL4pbIhT9sTK+su6+dJFklT7dh9JMYF6gm/Y60ffGKNy16zMBcgJa9xf0e8ncSbtlkkBwX4QIMSZu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5288.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(396003)(376002)(346002)(39860400002)(451199021)(110136005)(52116002)(6486002)(6666004)(478600001)(1076003)(26005)(6506007)(186003)(107886003)(66946007)(4744005)(2906002)(6512007)(4326008)(316002)(41300700001)(5660300002)(8676002)(66476007)(38350700002)(38100700002)(8936002)(66556008)(86362001)(36756003)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2sVH7rGTAB2DzfsfJL3TEADLccoLNn8gQsI64GGg82b7oHsjuEpn7Wh4GQm3yiBoQf/S8yALppJlheD9PMRKcBLNgQ8acoDCWEG/c10PoAV5y9Rw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GdnN55zPpruX/u+ffJftlEI8sHTf0nXe7Tc3mUtvAvPirl8xLNjZ6IL0LtJ9ewfITcKNHMQ/9RHOKZjy/3iUsTqVRmFbNZY9tS4DVpmPdj14a/sfxnev1GY28ggmLJbs9opilQPX7LIKysxtwMemAbIrxditDHrpTCAyzWlrdmU7NsEQDejUK1GX9ZPR2jho/4YnZSNZM9BFLJ+3ojQhfb4Pl7ssgKa6+bk0h7pMKNX+TNbzgodd+0GrAc+nv0kyTagwAMhFmkLVyRXkvMSi5B/mkl5A+FGAVuvk7TLmz0ZHKDE9fCmjWDmb3gpaSJIovGshFbNkFCjALgkm0GhXiM3cCnzBUyJdee1JR2tyExeLHJM/C1RNPTihVdM8z1HFrJ9cqMfVyQ+3PatFnJy4Ej/A X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 668a583d-cb47-4298-f936-08db82cdd513 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 11:47:55.9458 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8xluMiKJOdCS+ge0MIDRH4qCBjBSP1J1pnD7mMPBOpiD5c6Ffsw6bQn+aUFqjy6x4xgx0Jx5/L9lA3NFXSxf2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4537 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Make IS_ERR() judge the debugfs_create_dir() function return in ath9k_init_debug() Signed-off-by: Minjie Du Acked-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index fb7a2952d..995c6e705 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1420,7 +1420,7 @@ int ath9k_init_debug(struct ath_hw *ah) sc->debug.debugfs_phy = debugfs_create_dir("ath9k", sc->hw->wiphy->debugfsdir); - if (!sc->debug.debugfs_phy) + if (IS_ERR(sc->debug.debugfs_phy)) return -ENOMEM; #ifdef CONFIG_ATH_DEBUG