From nobody Mon Apr 6 11:00:46 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 B5ECDC54EE9 for ; Thu, 8 Sep 2022 13:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232102AbiIHNKO (ORCPT ); Thu, 8 Sep 2022 09:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbiIHNJq (ORCPT ); Thu, 8 Sep 2022 09:09:46 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2535C11 for ; Thu, 8 Sep 2022 06:09:29 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id go34so2893496ejc.2 for ; Thu, 08 Sep 2022 06:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=tReQnZIM/2GXsnwHvYX7dmOzuxjlvlNGIgAsvxQ1yRc=; b=i64quYvlQ46IAbHchD9nAqJI/KHzq9w0j8q6dfs7eCEhjUk3Oif4adCO7pMd5bdSIM IOu2dEyIA3Sku7i0R8zrnGgvVpEP1w7TlRcZ7Pi15Bb/Tms7sOGXhzKYmFyAeCpp5bQI ccqqOeqb+PKRf26AJprMiVpbz1LB2lCUUI3YTcYSN5LL3I3A1mQdjFCr2F70zNFDftaM dUZ4D/AUA4JUM2BN3CEemAxPdSkdUIwhb1AUzZY10VwrG5yPY66BD+e5dQ5/iaAQBKus rbp5a9YmEkBQ594K4t/9XM0E7dyaIxgwjyymYaVdcKCDk+Ur67cG+QlPJHYsgtlNF5C3 bS8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=tReQnZIM/2GXsnwHvYX7dmOzuxjlvlNGIgAsvxQ1yRc=; b=uunKcMKKm8MhUT2a5vBNsIsA/NvBHUEus8MUzSWaNcZ/O6sJxPY2fyDYy+w9ybHT8L iZALi/t75JxUFx2k8F6gefD66J1Zurga4zFYfLhcO5H/lcCd8XH7iwT2kyNx4zCXJmFA KES5GzivWY1ug4VSC3mUO0DOFfRhqRGpkoL7bG8wXdqGuyy4VaMXhu4NVul+gnKxYMU9 g179dbc1YvM7p0Hw2s0FPLkmmnVd3xOXvS0i3W5a5Yg9/RN6R3YffLtG4x53aGz/eyoN Lenw+iWYG3AtRLhqBtoAG5wUopUFzzj+lsQtR4is3ckcr1xZ2bR++Sia0bz8o0tIkvHC mA/w== X-Gm-Message-State: ACgBeo1g1o8drroAM207/6Lm/UEVW3feh94asLDpKbfdxCAT+ujQlln9 iV74j0XHNKGp9q31mzZQyCk= X-Google-Smtp-Source: AA6agR6VijqSfYBtjgJ/lXIIch+djV1FGMJrTaOymkJRGHnbP/TSIHqgHGRXbkuLmcToUBeMcizB/g== X-Received: by 2002:a17:907:2ced:b0:773:6f77:f10f with SMTP id hz13-20020a1709072ced00b007736f77f10fmr2860143ejc.34.1662642568533; Thu, 08 Sep 2022 06:09:28 -0700 (PDT) Received: from localhost.localdomain (ip5f5abb6b.dynamic.kabel-deutschland.de. [95.90.187.107]) by smtp.gmail.com with ESMTPSA id cf6-20020a0564020b8600b0044edf0a2deasm4847978edb.69.2022.09.08.06.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 06:09:28 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 4/4] staging: r8188eu: remove unnecessary return labels. Date: Thu, 8 Sep 2022 15:09:15 +0200 Message-Id: <20220908130915.8406-5-straube.linux@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220908130915.8406-1-straube.linux@gmail.com> References: <20220908130915.8406-1-straube.linux@gmail.com> 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" Remove the RETURN labels in rtw_alloc_etherdev_with_old_priv() and rtw_alloc_etherdev() and return directly to clean up the code and improve readability. Signed-off-by: Michael Straube --- drivers/staging/r8188eu/os_dep/osdep_service.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/stagi= ng/r8188eu/os_dep/osdep_service.c index 3504a0a9ba87..875a41650896 100644 --- a/drivers/staging/r8188eu/os_dep/osdep_service.c +++ b/drivers/staging/r8188eu/os_dep/osdep_service.c @@ -54,14 +54,13 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int= sizeof_priv, =20 pnetdev =3D alloc_etherdev_mq(sizeof(struct rtw_netdev_priv_indicator), 4= ); if (!pnetdev) - goto RETURN; + return NULL; =20 pnetdev->dev.type =3D &wlan_type; pnpi =3D netdev_priv(pnetdev); pnpi->priv =3D old_priv; pnpi->sizeof_priv =3D sizeof_priv; =20 -RETURN: return pnetdev; } =20 @@ -72,19 +71,18 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv) =20 pnetdev =3D alloc_etherdev_mq(sizeof(struct rtw_netdev_priv_indicator), 4= ); if (!pnetdev) - goto RETURN; + return NULL; =20 pnpi =3D netdev_priv(pnetdev); =20 pnpi->priv =3D vzalloc(sizeof_priv); if (!pnpi->priv) { free_netdev(pnetdev); - pnetdev =3D NULL; - goto RETURN; + return NULL; } =20 pnpi->sizeof_priv =3D sizeof_priv; -RETURN: + return pnetdev; } =20 --=20 2.37.2