From patchwork Mon Oct 25 11:44:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1545707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=qAJEtSjM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HdCyP5rfvz9t1r for ; Mon, 25 Oct 2021 22:53:17 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1meyXI-0005gk-G9; Mon, 25 Oct 2021 11:53:04 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1meyP6-00059p-Tv for kernel-team@lists.ubuntu.com; Mon, 25 Oct 2021 11:44:36 +0000 Received: from HP-EliteBook-840-G7.. (1-171-210-154.dynamic-ip.hinet.net [1.171.210.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id CEC4E41983 for ; Mon, 25 Oct 2021 11:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635162276; bh=bFhTi9v/jpE9i1Z1+ijXCqWURsU81AgteIvbl81izm8=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qAJEtSjM0dNueskYXNU7eSWZVOxQHPBF4CnKGv11Wk9Mi6GSKlEyAR5viJWpt5GEt RkrisWsp2/RMyQoMT06iIAwvCxbInu0tlm8ckKVkuWCqsn7HmrgnLhJIpkW3cHaq9O wm+A7+1tEPiGnVd9zHUhVt/U/qQcqZg3XvAG4M+qF81FC73P3JrNiY/T0m47FOpbkT QtC6cC1yqQSbVPunMY/WF4zdL8gltAvi00lIZTfGmgFv7izrHswm3R3xFzNYiAuI57 B9Q3PMlcxKXK/JYLqz7z18NkhMxOH2RY+Ag19Sc6l/U3w+fK97eWt+j1eu4zl9mVBg HskiFcMfcRR9Q== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [I/Unstable/OEM-5.10/OEM-5.13/OEM-5.14] [PATCH v2 2/5] rtw89: Remove redundant check of ret after call to rtw89_mac_enable_bb_rf Date: Mon, 25 Oct 2021 19:44:10 +0800 Message-Id: <20211025114414.1334615-4-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025114414.1334615-1-kai.heng.feng@canonical.com> References: <20211025114414.1334615-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Colin Ian King BugLink: https://bugs.launchpad.net/bugs/1945967 The function rtw89_mac_enable_bb_rf is a void return type, so there is no return error code to ret, so the following check for an error in ret is redundant dead code and can be removed. Addresses-Coverity: ("Logically dead code") Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20211015152113.33179-1-colin.king@canonical.com (cherry picked from commit f7e7e440550b0b176df3d2ea3e76106bc89915d9 linux-next) Signed-off-by: Kai-Heng Feng --- drivers/net/wireless/realtek/rtw89/mac.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c index 0171a5a7b1de0..69384c43c0461 100644 --- a/drivers/net/wireless/realtek/rtw89/mac.c +++ b/drivers/net/wireless/realtek/rtw89/mac.c @@ -2656,8 +2656,6 @@ int rtw89_mac_init(struct rtw89_dev *rtwdev) goto fail; rtw89_mac_enable_bb_rf(rtwdev); - if (ret) - goto fail; ret = rtw89_mac_sys_init(rtwdev); if (ret)