]> 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)
commiteee4b1e694a562547c68173c36ff96c07454e0af
tree9671b8250f80a796e9dcf06933a4f9dc799600be
parentb2778f504465079d55e04f103eaa6a9f648c68dc
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