summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-11-08 02:08:43 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 09:14:11 +0100
commit9f49ba339b3af5b0a833178b2529c6b9873f7e6f (patch)
treefc784c0834d03184257fa21a5d51228187271240
parent1939580da1f592c7ba8122b02c6d6532ed64452e (diff)
downloadlinux-stable-9f49ba339b3af5b0a833178b2529c6b9873f7e6f.tar.gz
linux-stable-9f49ba339b3af5b0a833178b2529c6b9873f7e6f.tar.bz2
linux-stable-9f49ba339b3af5b0a833178b2529c6b9873f7e6f.zip
net: bcmgenet: return correct value 'ret' from bcmgenet_power_down
[ Upstream commit 0db55093b56618088b9a1d445eb6e43b311bea33 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/genet/bcmgenet.c: In function 'bcmgenet_power_down': drivers/net/ethernet/broadcom/genet/bcmgenet.c:1136:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] bcmgenet_power_down should return 'ret' instead of 0. Fixes: ca8cf341903f ("net: bcmgenet: propagate errors from bcmgenet_power_down") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 1cc4fb27c13b..b6af286fa5c7 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1138,7 +1138,7 @@ static int bcmgenet_power_down(struct bcmgenet_priv *priv,
break;
}
- return 0;
+ return ret;
}
static void bcmgenet_power_up(struct bcmgenet_priv *priv,