From: Wei Yongjun Date: Wed, 20 Mar 2013 12:22:54 +0000 (+0800) Subject: cfg80211: fix error return code in cfg80211_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f00f188f8212fec9976394976c4fd5d4a3bc4dcf;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cfg80211: fix error return code in cfg80211_init() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Johannes Berg --- diff --git a/net/wireless/core.c b/net/wireless/core.c index f382cae983ba..92e3fd44e3b0 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1096,8 +1096,10 @@ static int __init cfg80211_init(void) goto out_fail_reg; cfg80211_wq = create_singlethread_workqueue("cfg80211"); - if (!cfg80211_wq) + if (!cfg80211_wq) { + err = -ENOMEM; goto out_fail_wq; + } return 0;