cfg80211: propagate -ENOMEM during regulatory_init()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 21 Feb 2009 05:04:24 +0000 (00:04 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:52:55 +0000 (14:52 -0500)
commitbcf4f99b7b1e0971b79e8df40331e77fc1744049
tree516fa955b67eb6773b42fd54fd425669d62ddcaf
parentba25c1414264f1f5fc046cf34d20947e41713a0d
cfg80211: propagate -ENOMEM during regulatory_init()

Calling kobject_uevent_env() can fail mainly due to out of
memory conditions. We do not want to continue during such
conditions so propagate that as well instead of letting
cfg80211 load as if everything is peachy.

Additionally lets clarify that when CRDA is not called during
cfg80211's initialization _and_ if the error is not an -ENOMEM
its because kobject_uevent_env() failed to call CRDA, not because
CRDA failed. For those who want to find out why we also let you
do so by enabling the kernel config CONFIG_CFG80211_REG_DEBUG --
you'll get an actual stack trace.

So for now we'll treat non -ENOMEM kobject_uevent_env() failures as
non fatal during cfg80211's initialization.

CC: Greg KH <greg@kroah.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/reg.c