From patchwork Thu Jul 13 08:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minjie Du X-Patchwork-Id: 13311552 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 09B96C0015E for ; Thu, 13 Jul 2023 08:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234531AbjGMId4 (ORCPT ); Thu, 13 Jul 2023 04:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbjGMIdc (ORCPT ); Thu, 13 Jul 2023 04:33:32 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2114.outbound.protection.outlook.com [40.107.215.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D25729B; Thu, 13 Jul 2023 01:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBf4G/DH7iyDOINlPSdumkTgpuwNPAoXQGmSkJ0QueiXBSEepvFcivudsmIkfhbcXxzxWhQYZ2UatGO5cuaB3vYGrRyn43tSHJJLrFaEpmd2c8V8PkSSEmfV7333SpU6rnqoo3wIz6xujN30MXKxBQbCchZ6nB9cCEGlpE+u1R6HnjP8cOcTDkFCtl1G0cchiqrhhZhcTBHK9H0mMyOrCB1QQtfYjteBkJ3GFqth3xystxzuHSq/xDlRo84LbBlV6JNuqeQpSPaI/9yTq31ZvKkhDVl2euBS92jcluxUD4qVFN+fCu++lwBwSnsQTzZxv1u7IFTtFo7spm4E8oh+9A== 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=2bxo1xLolQfpW5eY1VGCdRZTgP1+MVHPpwxQVGaezwc=; b=lfjUYYoWnrewtIUO+maPGTvJru0+EpjrM+BD1QDqIk/+6iFzqTYraBMrTuud5LCIHarzRlIXlFKC2ObbPa7FszOa69SjlVINVx0hh6SN3cy58YXA2lfkig77Kfz0Fc5uvgmo113hIhWWZLCHFDPHY69++0nRHZBhr52Z4wHeqDcleQk1w9ib9ybAxiaZZi6qM/z7MfV7ez3gABfLqGjaVlX4oNRXDJKnDl/u2DopRnYjbUoIcuNJ/qG+Y3AcIE8MyLglena7spPvg2+NT4yCHvUdLSSR+CCXR7UTQFm3vGH4Q9csM+tp/e+xiVAuQ64qdcRwp1q5Efh7ZcqEwtpcLw== 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=2bxo1xLolQfpW5eY1VGCdRZTgP1+MVHPpwxQVGaezwc=; b=A50vvBJWCBiYxzyYzKeBIgtfhzWOf18YyppbC3TQx38+4osutjCP4fRSx21YChnGV02b+vzcEHFYKTDWetKcvVIPIgskzSLye42y1oMGgjw/H1mmMw1vM162cSLQ1epRP99VrGyXm5k+ulaeE61nloIt90aRj0jDEWi64iiP5DVW1mSV+0DLbkabMPfxfYOfmK/x7C/VnG4hIWXxv2aXGqpAsUjw9YA8rsMDR4/wHIh+5R82TaSiDnlg+z4K0OEQqXN4V4rOcM4Djl5y1bp9WYKKjaXyN4776GqB0wfZZ/Gie1UazPF1Qd6QbzJSyM23tUHeCxoRks/yeS4i0LnfeQ== 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 KL1PR06MB6686.apcprd06.prod.outlook.com (2603:1096:820:fe::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Thu, 13 Jul 2023 08:24:43 +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; Thu, 13 Jul 2023 08:24:43 +0000 From: Minjie Du To: Jiri Slaby , Nick Kossifidis , Luis Chamberlain , Kalle Valo , linux-wireless@vger.kernel.org (open list:ATHEROS ATH5K WIRELESS DRIVER), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v4] wifi: ath5k: remove parameter check in ath5k_debug_init_device() Date: Thu, 13 Jul 2023 16:24:32 +0800 Message-Id: <20230713082433.11485-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: TYAPR01CA0119.jpnprd01.prod.outlook.com (2603:1096:404:2a::35) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|KL1PR06MB6686:EE_ X-MS-Office365-Filtering-Correlation-Id: b570493d-45bc-4582-3857-08db837a9c18 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8rHNY8EHLu8/4E8PMJXtYp8neA2QJA/WL1udRay9KoplPsjhveapw760KHreeacYP0GOzo405c2fF/zT5b3u152wAroQz1Wqv2M6rlWs/fUNfOEfEw5cLP8cphZf+L9ZB1w4Dfgg3lHmElDvBBVgjisyv3MAbeNmFfTZRLNjn5078bdsxSdqv7lVHSwSTQlPv0hTyCOvfW2jtHjj0TlQJP+TRZaRTMM7h6+iO5FJs2LWGTGcoPuc+XFiB1i43bG7VnabmFV4OB/RCPYCE10goGEn39WHkoeJsuA6nMMwDLunbV8KiTDJyHqikBeyPzbt99y1+EmddrEUaJCxhqXTFnl/9Lsm/XQXYvQUGq5VMKZdVZk4QVooUAB4UCBkJo38k2Ez1Lv96QBA2Bp1EvWS0M99OCg5V/sZXJ5SyklaMhfD7OZLDREq6hB1iLJ9ZPSWiqJAjKnDHk9saFIE+Ppi5xICuoW7Eb4hkogvL2gZhrTZyLgib5FbLHL+6k6eHF/jaMA5m0piUjNkB4nsnrvHYYS2ULRrnu6gsBrQqgsIdJxVKVN91oIfzwmAOZGLJz7HvDLg8izADZSTA91NGs9CZuA/3+83k8MQ39Yz3emYgO3kZbaStxZuqR1wuyc9Ghuu6e4emc1Gi1TrRwRZBieiow== 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)(39860400002)(376002)(396003)(346002)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(186003)(26005)(6506007)(1076003)(6512007)(107886003)(2906002)(4744005)(66946007)(41300700001)(316002)(4326008)(66476007)(66556008)(8676002)(5660300002)(8936002)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(2616005)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pPRdNEZgdbwwYFcnSNvU5V6cPyK5xTOTs7A7DywznWtC+eQxnBWtda+0y5OrGQVIUW1UgR0TB8r4pjEBzsvI+wV6cz8Boh2tV/veyBIU1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+2mLGmyD9cdzzKPTJOml8tc5uH5mTfgE04Nu5w7VKWXHmRPwSdBnI4JRbjYZbNaz/Q7fzBJLLdSt84ugqDe/W6TsIATe9J0/oaS+nNbUQ6xm9VsnmmFl5vhf6RfdNTBKyEkp3iueG5DdmbOokay1Lfp7NUq7++4OREfYZeNIgnydkcuWQikuTRqzQ/HGEKodBIqeSM1FDHmNq+60ZnMNnKqQg0+6tZL1z/P7D4fbrYMWww2jbgMoij46b7EOMpRspo+2G6mTLhGGBbaHNkMXWx6Lr0D5z7cQ4/GUxdN/E7g62dN3ADeNtwBqD6MYETXD6BdRAZFmaa8CDAyUNgrDcd+DwgQUWRXYENEoKa62QvwXVWwTZC8MJn4qseHI0nNigYaN1Am9uvpbx2HvVnt0hZcswGmlNp/tIYyZ0+lr X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b570493d-45bc-4582-3857-08db837a9c18 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:24:43.3193 (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: SmdyKGE41bGHeqqXHVy95UoEf7Sjn1D8C9qmWdCUnK/W7MKDIYO6YViX1n0rcO0Jcx7ZIEN8edeUxOBOJj6oBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6686 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The parameter 'phydir' error check is mistake. debugfs_create_file() will return early if 'phydir' is an error pointer, so the error check is removed. Signed-off-by: Minjie Du --- v1: use IS_ERR() to error check. v2: use IS_ERR_OR_NULL() to error check. v3: remove the error check. v4: fix the patch format. --- drivers/net/wireless/ath/ath5k/debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 4b41160e5..ec130510a 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c @@ -982,8 +982,6 @@ ath5k_debug_init_device(struct ath5k_hw *ah) ah->debug.level = ath5k_debug; phydir = debugfs_create_dir("ath5k", ah->hw->wiphy->debugfsdir); - if (!phydir) - return; debugfs_create_file("debug", 0600, phydir, ah, &fops_debug); debugfs_create_file("registers", 0400, phydir, ah, ®isters_fops);