* [PATCH] mac80211_hwsim: fix error return code in init_mac80211_hwsim()
@ 2013-08-26 7:32 Wei Yongjun
2013-08-26 7:37 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-08-26 7:32 UTC (permalink / raw)
To: linville; +Cc: yongjun_wei, linux-wireless
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return -ENOMEM in the netdev alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/wireless/mac80211_hwsim.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index cb34c78..9e0ebee 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2525,8 +2525,10 @@ static int __init init_mac80211_hwsim(void)
}
hwsim_mon = alloc_netdev(0, "hwsim%d", hwsim_mon_setup);
- if (hwsim_mon == NULL)
+ if (hwsim_mon == NULL) {
+ err = -ENOMEM;
goto failed;
+ }
rtnl_lock();
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-26 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 7:32 [PATCH] mac80211_hwsim: fix error return code in init_mac80211_hwsim() Wei Yongjun
2013-08-26 7:37 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox