]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: bcmgenet: return correct value 'ret' from bcmgenet_power_down
authorYueHaibing <yuehaibing@huawei.com>
Thu, 8 Nov 2018 02:08:43 +0000 (02:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 00:21:41 +0000 (16:21 -0800)
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>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index 2d6f090bf6440cc7253fe4f0764b10bde618ff73..bf88749505a985b9a0b04ce1c741b259fde9ba1a 100644 (file)
@@ -1169,7 +1169,7 @@ static int bcmgenet_power_down(struct bcmgenet_priv *priv,
                break;
        }
 
-       return 0;
+       return ret;
 }
 
 static void bcmgenet_power_up(struct bcmgenet_priv *priv,