projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4063469
)
sh_eth: no need for *else* after *goto*
author
Sergei Shtylyov
<
[email protected]
>
Wed, 4 Jan 2017 12:10:50 +0000
(15:10 +0300)
committer
David S. Miller
<
[email protected]
>
Wed, 4 Jan 2017 18:47:54 +0000
(13:47 -0500)
Well, checkpatch.pl complains about *else* after *return* and *break* but
not after *goto*... and it probably should have complained about the code
in sh_eth_error(). Win couple LoCs by removing that *else*. :-)
Signed-off-by: Sergei Shtylyov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/renesas/sh_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/renesas/sh_eth.c
b/drivers/net/ethernet/renesas/sh_eth.c
index c89569509a473badf335fe563699543d3282aad1..72a1fad4e93039427ba295d19f2035e25987aaa3 100644
(file)
--- a/
drivers/net/ethernet/renesas/sh_eth.c
+++ b/
drivers/net/ethernet/renesas/sh_eth.c
@@
-1542,13
+1542,11
@@
static void sh_eth_error(struct net_device *ndev, u32 intr_status)
ndev->stats.tx_carrier_errors++;
if (felic_stat & ECSR_LCHNG) {
/* Link Changed */
- if (mdp->cd->no_psr || mdp->no_ether_link)
{
+ if (mdp->cd->no_psr || mdp->no_ether_link)
goto ignore_link;
- } else {
- link_stat = (sh_eth_read(ndev, PSR));
- if (mdp->ether_link_active_low)
- link_stat = ~link_stat;
- }
+ link_stat = sh_eth_read(ndev, PSR);
+ if (mdp->ether_link_active_low)
+ link_stat = ~link_stat;
if (!(link_stat & PHY_ST_LINK)) {
sh_eth_rcv_snd_disable(ndev);
} else {