From nobody Thu Apr 9 13:41:52 2026 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 446B6C4332F for ; Sun, 6 Nov 2022 12:49:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229737AbiKFMt3 (ORCPT ); Sun, 6 Nov 2022 07:49:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbiKFMtR (ORCPT ); Sun, 6 Nov 2022 07:49:17 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9E0464E0 for ; Sun, 6 Nov 2022 04:49:16 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1orf5M-0008Dj-PQ; Sun, 06 Nov 2022 13:49:12 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 6/9] staging: r8188eu: clean up rtw_hal_init Date: Sun, 6 Nov 2022 13:48:58 +0100 Message-Id: <20221106124901.720785-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Clean up the rtw_hal_init function. Remove the status variable. Exit immediately for errors. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/hal_intf.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188= eu/hal/hal_intf.c index 37935aef71ea..13790e32f11c 100644 --- a/drivers/staging/r8188eu/hal/hal_intf.c +++ b/drivers/staging/r8188eu/hal/hal_intf.c @@ -6,24 +6,19 @@ #include "../include/drv_types.h" #include "../include/hal_intf.h" =20 -uint rtw_hal_init(struct adapter *adapt) +uint rtw_hal_init(struct adapter *adapt) { - uint status =3D _SUCCESS; - adapt->hw_init_completed =3D false; =20 - status =3D rtl8188eu_hal_init(adapt); + if (rtl8188eu_hal_init(adapt) !=3D _SUCCESS) + return _FAIL; =20 - if (status =3D=3D _SUCCESS) { - adapt->hw_init_completed =3D true; + adapt->hw_init_completed =3D true; =20 - if (adapt->registrypriv.notch_filter =3D=3D 1) - hal_notch_filter_8188e(adapt, 1); - } else { - adapt->hw_init_completed =3D false; - } + if (adapt->registrypriv.notch_filter =3D=3D 1) + hal_notch_filter_8188e(adapt, 1); =20 - return status; + return _SUCCESS; } =20 uint rtw_hal_deinit(struct adapter *adapt) --=20 2.30.2