summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/mvpp2.c
diff options
context:
space:
mode:
authorJisheng Zhang2016-03-31 11:01:23 +0200
committerDavid S. Miller2016-04-01 20:35:47 +0200
commitd82b0c21d44d1cc61a23db56c2b2cf52ea9f3220 (patch)
tree40dba52f8d73c71935a2446c81a60be27af878a9 /drivers/net/ethernet/marvell/mvpp2.c
parenttun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter (diff)
downloadkernel-qcow2-linux-d82b0c21d44d1cc61a23db56c2b2cf52ea9f3220.tar.gz
kernel-qcow2-linux-d82b0c21d44d1cc61a23db56c2b2cf52ea9f3220.tar.xz
kernel-qcow2-linux-d82b0c21d44d1cc61a23db56c2b2cf52ea9f3220.zip
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>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2.c')
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c4
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)
/* Map physical Rx queue to port's logical Rx queue */
rxq = devm_kzalloc(dev, sizeof(*rxq), GFP_KERNEL);
- if (!rxq)
+ if (!rxq) {
+ err = -ENOMEM;
goto err_free_percpu;
+ }
/* Map this Rx queue to a physical queue */
rxq->id = port->first_rxq + queue;
rxq->port = port->id;