diff options
author | Jisheng Zhang <jszhang@marvell.com> | 2016-03-31 05:01:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-01 14:35:47 -0400 |
commit | d82b0c21d44d1cc61a23db56c2b2cf52ea9f3220 (patch) | |
tree | 40dba52f8d73c71935a2446c81a60be27af878a9 | |
parent | 5a5abb1fa3b05dd6aa821525832644c1e7d2905f (diff) |
net: mvpp2: fix maybe-uninitialized warning
This is to fix the following maybe-uninitialized warning:
drivers/net/ethernet/marvell/mvpp2.c:6007:18: warning: 'err' may be
used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 05f358b81791..2750cb978f42 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c | |||
@@ -6047,8 +6047,10 @@ static int mvpp2_port_init(struct mvpp2_port *port) | |||
6047 | 6047 | ||
6048 | /* Map physical Rx queue to port's logical Rx queue */ | 6048 | /* Map physical Rx queue to port's logical Rx queue */ |
6049 | rxq = devm_kzalloc(dev, sizeof(*rxq), GFP_KERNEL); | 6049 | rxq = devm_kzalloc(dev, sizeof(*rxq), GFP_KERNEL); |
6050 | if (!rxq) | 6050 | if (!rxq) { |
6051 | err = -ENOMEM; | ||
6051 | goto err_free_percpu; | 6052 | goto err_free_percpu; |
6053 | } | ||
6052 | /* Map this Rx queue to a physical queue */ | 6054 | /* Map this Rx queue to a physical queue */ |
6053 | rxq->id = port->first_rxq + queue; | 6055 | rxq->id = port->first_rxq + queue; |
6054 | rxq->port = port->id; | 6056 | rxq->port = port->id; |