From patchwork Thu Jul 13 07:46: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: 13311438 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 2BC23C0015E for ; Thu, 13 Jul 2023 07:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232508AbjGMHrB (ORCPT ); Thu, 13 Jul 2023 03:47:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232461AbjGMHq5 (ORCPT ); Thu, 13 Jul 2023 03:46:57 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54627B7; Thu, 13 Jul 2023 00:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XuKYXDyorY0QwBOI/+VlLBpuGtMk9zCtL5+8cztDkyDajbrW6eJ2YLMOF3afTchwS2JA9vZ9IQfQm97/mTUSh88obZyujENmzki0SEzBnAg8TUxaFaMkScAJ6V3a3vZO+j+P5NtvqKKzOn9JF9FKOZ+QZMEICyLEPwMzhIk5uvh5z+BvoxOCpkqaSwUQw2fwHVMJsKzr9ecNwOg0OkH5a6AkfUhwql8aRb9IUZjYk81ua+BFY7f6JI7McOtizoXNHW4EH6AnR3SjU3lYn/d3yP5faNxXS5GssSqOisoWr9vTRbwW6VaGfpUu6YxM3PSI4LPkQi+R+S/aKzA95a59UA== 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=sFVcN6Z/bvdnA+549n9s8cmHl4AdhVjhKxg3id/pKBs=; b=Mf1i6+LIWHSGX3/rDCZ+zayiIEiaRKKgPN6rrcGx01Gr1nlbB1Y/YXNQovq9Mo7cE+7Azocb65DSybtsHdmDopBQXgGT3IbgNJuN3KRLJWX9+QPuTPs+8G8bks7hSgQdyeit7OHyBXVC9uO2jG5sJPzXCQV06GDn5Dx+tuLFZdcRZesQY0lDTBiELhB2BnULKt5bV65xFKGguJkDDR8jQRtoyn9hU+TONSXbQwfl1yb6NZn9zCEhJUMV0wcdomwSPfRNR/2O48qct3M29XYZnJZUcx2qTwKqLc+O5ja3IPnpZ2demhGtH/GQl5q/PScLWEVrwuqHDKDU32jQimLBoQ== 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=sFVcN6Z/bvdnA+549n9s8cmHl4AdhVjhKxg3id/pKBs=; b=YNoiqYEmqOKKPTWwhyQ3zIKdawSQwhF37EI4vPIz/B8RfNHfoIJKZ3Sbuy1uRjgH3zIi2FvKyWgYythMXDqXIeRo2Bgk9Eu0sGLh1c+DISDM0/FVNhESJv3xfi1+nK4BQPiSJrk8IOrYWWvPlMb90DrXfa1WlFWu2sqHEf2/E0ur+np14+d3bVWjWxttAw5hK3m38jCkJ/Us05Wu2ez7iW5FI3z517yrOBD+Wgr16lOn8xvFcFNJxZIuDTNQ9nwWGuPEfyZnYs31uD5VuhZY6YzsO7/nN2YFSYFNtuTv/Qjcwz7lL23zApM59EUSDyTqkZsjLScGy6ntdItYOXCL0g== 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 KL1PR06MB6299.apcprd06.prod.outlook.com (2603:1096:820:ce::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 07:46:50 +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 07:46:50 +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 v3] drivers: wireless: ath5k: remove parameter check in ath5k_debug_init_device(struct ath5k_hw *ah) Date: Thu, 13 Jul 2023 15:46:32 +0800 Message-Id: <20230713074632.11204-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::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_|KL1PR06MB6299:EE_ X-MS-Office365-Filtering-Correlation-Id: a48b4100-a02a-41c8-88cb-08db83755170 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9zk0rfaKbr2xzOnsQjOR00bYv0yU78RQunqbcJkX8vr1SP/ocYQpD9VnZ3H5Wy+LSUgM8asCX43+HEfV22T2MZVoZXbbhhGW3GW7WTC5ITAciImRvokFdeZd6D3JlGw+dChNRfhOe2a9Xjk0kbmRJ0MSHqQ0GTZbHe2WdewDJqHPkNJSTfjqkLdw6kfkBZpwXaomBup6+Lr9V1PVzvMybsbjU3hR7S0VEFU2Qj7O7UcudUlGSbtqHE16TnOaUd4jfF0Lf7oGCwMKuT9/EhUknjAou88PZn8Akz6XaZVLwp0wKs9O5IGrVGc2bNscRlds9vy7eFg0pidj5pfEaH0JTwMn8AhzjbQQP5m4AK01DE+wO5TNRF5J0UlxnQr7gqiC/0ZpY2q9tr6Lwkwayot6Nle7X4yaHqGOhhpwCxr0TgMEMz/K3IrAVzpwx9rn6WxpBU1PrCqQ/K5bniiTreSsauYckpKqbUyvdmiwsxOxNnyHj9LIsNJqyJnOiopQ2W809lmG9zgsqH6YkYRrODMoD7G9kdJrUK6gu8Dg13XQk06b7PzJplm1lOPjbF2ckVlSrZ6JwJjFJIG7eVH0XIHMQSUq95Iig5POlBy3GFhBGWm3sX0syHUcXS00U3rk/Klp739J6UG+NOyj8VM1+XQdIA== 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)(346002)(136003)(366004)(39860400002)(396003)(376002)(451199021)(110136005)(186003)(4326008)(66556008)(66476007)(66946007)(52116002)(6486002)(6512007)(41300700001)(478600001)(316002)(6666004)(8936002)(8676002)(107886003)(86362001)(26005)(6506007)(1076003)(5660300002)(83380400001)(2906002)(38350700002)(2616005)(36756003)(4744005)(38100700002)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ERqN3R2Mp5QXk+px4402XruQk1EU5w0I6g9JPXLB40bwoBcBZMznAnA4qM+vWAJg1M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l2CAk93qOwTJ7FpHX3qQmD6S04XWM8vKgUuPwlLYqP4NYb0LC9DBNAsr5ddD3hL1WaN86Z/OZ93ilT0gtbz2qMjQgpJngFgCWVcuJmPjNReOWSRk5klNLzPqxQPsrHGsA8ZEatJGMCsr5rsfXHW1ktQei9C0z1wXuhkHn9NFOZo8Dnx98XLajsYBRBk4nE7oa/jTSctcXsSjFgOqYiApm1jAkiTFBqLusiBK8paxxKOR3JS63KVPICDk+UQiVkCc/CoW42jI7yAMlX2pnFmXfTKJNtOfe0omlxN1XypBzrrewPi2M+UdxBD5Gg5N4LxIW3OZYXfpbRylqbGcTuI8PLLjlAMpvpu/Xth6YLcz/jdpsAAahRMuPX8AtH2D4FS5vltJrlRsy0ZaGzjLHhQ+l1PIReYWWp5fsh4y6gnzT/R4DBQuRg27JTJa5gTKfKaw0uCYkpLAknsm+1n/w X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a48b4100-a02a-41c8-88cb-08db83755170 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 07:46:50.5457 (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: gKPkHnv3xtjLtNlSV2BOSvlkc6+NxG5e0NeHJVZfsZPZVvH32LgCBsILpADwjTnVkZMuSkP0eI3xiH7RaIX1bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6299 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org debugfs_create_file() will return early if phydir is an error pointer, so an extra error check is not needed. Signed-off-by: Minjie Du --- 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);