]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix wiphy_register error path
authorJohannes Berg <johannes.berg@intel.com>
Fri, 10 May 2013 17:23:40 +0000 (19:23 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 16 May 2013 20:38:02 +0000 (22:38 +0200)
commit1da785e002844a7e1800e49651f88f46f88419b4
tree9671b8250f80a796e9dcf06933a4f9dc799600be
parent2765a8ea24e84d1a4a71d63e697b88cd0cdc29d0
cfg80211: fix wiphy_register error path

If rfkill_register() fails in wiphy_register() the struct device
is unregistered but everything else isn't (regulatory, debugfs)
and we even leave the wiphy instance on all internal lists even
though it will likely be freed soon, which is clearly a problem.
Fix this by cleaning up properly.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c