Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp978427ybz; Sat, 25 Apr 2020 08:21:00 -0700 (PDT) X-Google-Smtp-Source: APiQypJaQrILYUNafCEOdC/Xi8TZQ05l8cL/OHoojUuJ5m+zNyGYHPx+xg+T/QgN6N9dc613wbkL X-Received: by 2002:aa7:d481:: with SMTP id b1mr12309909edr.226.1587828060241; Sat, 25 Apr 2020 08:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587828060; cv=none; d=google.com; s=arc-20160816; b=b4tXHOUlZ/6wJ/ZhzFJUY4r4r1Z7HHkgCpLqaeFmC1mn+Z4ekWO2T/OPTLF40uyceK v4Tlqf3r7gCqPnQugYrzrKIoT0Ltl4B4JfXpRj8Xe1Cv9DPN/T0rx3fHW2JEa0Ep8yP5 AvYYPRaKzzdBIdQEBOzTYf1sdVuXI/huZFkYPQkWPzG+3c0GZ0+r17Piy2xNV3w2Fqel 6+Vz0EC1QuXR3KlaQZrIN+z8dkTPwwZzBwJ/9XKNgzg6IzbffQEeYqIF+dhBnhAWhA99 iqV7qdekEkKMkaBwzt1SzvzY8dem2A2Rxc1kP4VgiiVjYs44GtbWiwU/s5v9hQXUmVQ6 jj2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=umKV7KWA/tDycYowdBK1dJKgASbGQlndl4pWkMeEuYM=; b=gzBsR7DrD5oIrkVr6YlntjzGAl3ELt4APXbqswP6cyrWy6UrWr5aLEwXXR+G2cVSNH NOFVb1dlgZkP71VtzDuP5elxe6JBxrczZ1NCdoaq7QhLREENGlrU+uHnDFjJc8Q6mtX/ XS5y0FpDnV8yKRAQfKnBO335nNRJUEkMXyUeeGpcEXMlIFeYi/uftZExFHyIw7SAzqYm XU2G+fgCIOLy5SPV/wg1swj763duLag1CoA6GiZqbf8mIseBpkdgQE9AcdYXvzdogXCm PL7zvmY6zcNVcew1GMpAL8sWl3EFwtWe/pe7VD1myuRylj2uHMoAXbnpwGu7F0/dpulV vEgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="czG04/DB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si5056026edk.571.2020.04.25.08.20.37; Sat, 25 Apr 2020 08:21:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="czG04/DB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726169AbgDYPSp (ORCPT + 99 others); Sat, 25 Apr 2020 11:18:45 -0400 Received: from mout.gmx.net ([212.227.17.22]:43221 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbgDYPSm (ORCPT ); Sat, 25 Apr 2020 11:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1587827916; bh=1SIn20szDlQ1F4nqk/0hZ4TyVykqVcZwhLZeWLcVgGw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=czG04/DBSPtmlI8zLUxfI4a+WBUhg0Tsg1wCv6E4cUxnv6zUZ9yY7oRQJekxwm++D A4jLYBCDkqo00b6zSLRFlbKYhPPd9Whb2kcFLWpSwBYI5B9JEoaJKfubQMGqgXKsdI x2SErddN8O9AHd8Tj8Do4x8FTSk0YX851tCyWlbQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MCKBm-1jK9NZ2xPu-009Lus; Sat, 25 Apr 2020 17:18:35 +0200 From: Oscar Carter To: Forest Bond , Greg Kroah-Hartman Cc: Oscar Carter , Malcolm Priestley , Quentin Deslandes , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 2/3] staging: vt6656: Use return instead of goto Date: Sat, 25 Apr 2020 17:17:46 +0200 Message-Id: <20200425151747.8199-3-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200425151747.8199-1-oscar.carter@gmx.com> References: <20200425151747.8199-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:dSKDSH2PmwoWhFUHy30J0iudMbXoJEVM2KWUysCDF/0/DcK8GvV ejRAaFZV4wyIsY59XWoZfdSHGrrcoP6g0qcHZVu0bKGuJH7h2n+aJ2kp3N9OVGzeMBYOwSv 2ZVUE+0LeviPZjGR1JFdlM+V9kwKBboUTxKndFo0v7xgODPldx6XXRQbOxJF4UvTVe8m1Tt pXc8swqR+p+X0+ecAYv8Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:KdEsPLDpies=:M4fIKrEDHH4Bezwu3CRTCo s//uikx5zn+9x6YOOhRYyUNqoBeTUoicenevYFmXm+MDMj3ZS8c49aoL+R2b06fMCXJtrjZ/O etOAhFqsrYtDAta/SDUZTwnhK33Zen2yzbZFBqiWUsAH6W74bKpGBFGwx/5mFMPH0pojCKqAj u4+Zu/Vg9TKDD8jC5QcCYiFkdPDWs/IgVyJxk8bQZjl2XL8y5nF6Wpu1kD0/j95neBSJnYHOI cIc17a1uYVoaQ1VRbDoz+NBwrrr6RjG3Nz7IXLgDSyIaGs5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Replace the "goto" statements with a direct "return ret" as the jump label only returns the ret variable. Also, remove the unnecessary variable initialization because the ret variable is set a few lines later. Signed-off-by: Oscar Carter =2D-- drivers/staging/vt6656/rf.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 82d3b6081b5b..888b6fcb6e91 100644 =2D-- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -766,7 +766,7 @@ void vnt_rf_rssi_to_dbm(struct vnt_private *priv, u8 r= ssi, long *dbm) int vnt_rf_table_download(struct vnt_private *priv) { - int ret =3D 0; + int ret; u16 length1 =3D 0, length2 =3D 0, length3 =3D 0; u8 *addr1 =3D NULL, *addr2 =3D NULL, *addr3 =3D NULL; u16 length, value; @@ -819,7 +819,7 @@ int vnt_rf_table_download(struct vnt_private *priv) ret =3D vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0, MESSAGE_REQUEST_RF_INIT, length1, addr1); if (ret) - goto end; + return ret; /* Channel Table 0 */ value =3D 0; @@ -832,7 +832,7 @@ int vnt_rf_table_download(struct vnt_private *priv) ret =3D vnt_control_out(priv, MESSAGE_TYPE_WRITE, value, MESSAGE_REQUEST_RF_CH0, length, addr2); if (ret) - goto end; + return ret; length2 -=3D length; value +=3D length; @@ -850,7 +850,7 @@ int vnt_rf_table_download(struct vnt_private *priv) ret =3D vnt_control_out(priv, MESSAGE_TYPE_WRITE, value, MESSAGE_REQUEST_RF_CH1, length, addr3); if (ret) - goto end; + return ret; length3 -=3D length; value +=3D length; @@ -867,7 +867,7 @@ int vnt_rf_table_download(struct vnt_private *priv) ret =3D vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0, MESSAGE_REQUEST_RF_INIT2, length1, addr1); if (ret) - goto end; + return ret; /* Channel Table 0 */ value =3D 0; @@ -881,7 +881,7 @@ int vnt_rf_table_download(struct vnt_private *priv) MESSAGE_REQUEST_RF_CH2, length, addr2); if (ret) - goto end; + return ret; length2 -=3D length; value +=3D length; @@ -889,6 +889,5 @@ int vnt_rf_table_download(struct vnt_private *priv) } } -end: - return ret; + return 0; } =2D- 2.20.1