diff mbox

[2/5] wlcore: Delete an unnecessary check statement in wlcore_set_beacon_template()

Message ID ccb3f6ab-3c39-9c34-518f-f7f36615930b@users.sourceforge.net (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show

Commit Message

SF Markus Elfring Oct. 29, 2017, 8:12 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 29 Oct 2017 19:45:07 +0100

A goto statement jumped to a target which followed a condition check
immediately without the specification of useful actions between.
Thus remove such unnecessary source code at the end of this function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/wireless/ti/wlcore/main.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Julian Calaby Oct. 30, 2017, 1:26 p.m. UTC | #1
On Mon, Oct 30, 2017 at 7:12 AM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 29 Oct 2017 19:45:07 +0100
>
> A goto statement jumped to a target which followed a condition check
> immediately without the specification of useful actions between.
> Thus remove such unnecessary source code at the end of this function.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Looks good to me.

Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 48380d48ef09..efea811c1c83 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -4085,9 +4085,6 @@  static int wlcore_set_beacon_template(struct wl1271 *wl,
 					      min_rate);
 end_bcn:
 	dev_kfree_skb(beacon);
-	if (ret < 0)
-		goto out;
-
 out:
 	return ret;
 }