Skip to content

Commit

Permalink
net: bcmgenet: return correct value 'ret' from bcmgenet_power_down
Browse files Browse the repository at this point in the history
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: ca8cf34 ("net: bcmgenet: propagate errors from bcmgenet_power_down")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YueHaibing authored and David S. Miller committed Nov 9, 2018
1 parent 3ed3857 commit 0db5509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0db5509

Please sign in to comment.