Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1209379
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv2 14/19] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue |
| Date | 2015-08-18 19:10 +0200 |
| Message-ID | <pYSyB-48R-3@gated-at.bofh.it> (permalink) |
| References | <pYSoW-3I8-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
An else statement is not useful after a return.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 88108fb..21173b1 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -988,8 +988,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb_push(skb, USB_HWDESC_HEADER_LEN);
rtl819xU_tx_cmd(dev, skb);
ret = 1;
- spin_unlock_irqrestore(&priv->tx_lock, flags);
- return ret;
} else {
skb_push(skb, priv->ieee80211->tx_headroom);
ret = rtl8192_tx(dev, skb);
@@ -1300,12 +1298,11 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
status = usb_submit_urb(tx_urb, GFP_ATOMIC);
- if (!status) {
+ if (!status)
return 0;
- } else {
- DMESGE("Error TX CMD URB, error %d", status);
- return -1;
- }
+
+ DMESGE("Error TX CMD URB, error %d", status);
+ return -1;
}
/*
@@ -1644,11 +1641,11 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
dev->trans_start = jiffies;
atomic_inc(&priv->tx_pending[tcb_desc->queue_index]);
return 0;
- } else {
- RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
- status);
- return -1;
}
+
+ RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
+ status);
+ return -1;
}
static short rtl8192_usb_initendpoints(struct net_device *dev)
@@ -2924,20 +2921,20 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_20M))) {
if (rx_chk_cnt < 2)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
} else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_40M) ||
(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_20M)) &&
priv->undecorated_smoothed_pwdb >= VeryLowRSSI) {
if (rx_chk_cnt < 4)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
} else {
if (rx_chk_cnt < 8)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
}
if (priv->RxCounter == RegRxCounter)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 11/20] staging: rtl8192u: r8192U_core: fix unecessary braces code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:20 +0200
[PATCH 09/20] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 18/20] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 05/20] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 15/20] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:40 +0200
Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:50 +0200
[PATCH 17/20] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 14/20] staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:10 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:40 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:50 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 08:10 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 08:20 +0200
[PATCH 04/20] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:50 +0200
Re: [PATCH 07/20] staging: rtl8192u: r8192_core: whitespace neatening Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:30 +0200
[PATCHv2 00/19] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 17/19] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 03/19] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 08/19] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 01/19] staging: rtl8192u: r8192U_core: fix switch and case indent code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 18/19] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 16/19] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 14/19] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 09/19] staging: rtl8192u: r8192U_core: remove return statement of void function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 02/19] staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 11/19] staging: rtl8192u: r8192U_core: remove forward declarations in .c file Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 15/19] staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 04/19] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 05/19] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
Re: [PATCHv2 19/19] staging: rtl8192u: r8192U_core: fix line over 80 characters code style issue Dan Carpenter <dan.carpenter@oracle.com> - 2015-08-19 13:00 +0200
csiph-web