* [Patch net-next] netpoll: fix an uninitialized variable
@ 2013-01-23 3:39 Cong Wang
2013-01-23 4:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2013-01-23 3:39 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Cong Wang
From: Cong Wang <amwang@redhat.com>
Fengguang reported:
net/core/netpoll.c: In function 'netpoll_setup':
net/core/netpoll.c:1049:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
in !CONFIG_IPV6 case, we may error out without initializing
'err'.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index a9b1004..e2f79a1 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -1140,6 +1140,7 @@ int netpoll_setup(struct netpoll *np)
#else
np_err(np, "IPv6 is not supported %s, aborting\n",
np->dev_name);
+ err = -EINVAL;
goto put;
#endif
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch net-next] netpoll: fix an uninitialized variable
2013-01-23 3:39 [Patch net-next] netpoll: fix an uninitialized variable Cong Wang
@ 2013-01-23 4:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-23 4:22 UTC (permalink / raw)
To: amwang; +Cc: netdev
From: Cong Wang <amwang@redhat.com>
Date: Wed, 23 Jan 2013 11:39:11 +0800
> From: Cong Wang <amwang@redhat.com>
>
> Fengguang reported:
>
> net/core/netpoll.c: In function 'netpoll_setup':
> net/core/netpoll.c:1049:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> in !CONFIG_IPV6 case, we may error out without initializing
> 'err'.
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-23 4:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 3:39 [Patch net-next] netpoll: fix an uninitialized variable Cong Wang
2013-01-23 4:22 ` 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).