]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: mvpp2: fix maybe-uninitialized warning
authorJisheng Zhang <jszhang@marvell.com>
Thu, 31 Mar 2016 09:01:23 +0000 (17:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Apr 2016 18:35:47 +0000 (14:35 -0400)
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>
drivers/net/ethernet/marvell/mvpp2.c

index 05f358b817910bc9ea379d166adaeca2e54b2016..2750cb978f423f56528ce9d2aee1156c1e4446ee 100644 (file)
@@ -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;