* [PATCH] net: mvpp2: fix maybe-uninitialized warning
@ 2016-03-31 9:01 Jisheng Zhang
2016-04-01 18:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2016-03-31 9:01 UTC (permalink / raw)
To: davem, mw; +Cc: netdev, linux-kernel, linux-arm-kernel, Jisheng Zhang
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>
---
drivers/net/ethernet/marvell/mvpp2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index c797971a..e9aa8d9 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -6059,8 +6059,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;
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-01 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 9:01 [PATCH] net: mvpp2: fix maybe-uninitialized warning Jisheng Zhang
2016-04-01 18:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).