• Johannes Berg's avatar
    cfg80211: fix wiphy_register error path · 03cd7e4e
    Johannes Berg authored
    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: default avatarJohannes Berg <johannes.berg@intel.com>
core.c 28.7 KB