mac80211: clean up key freeing a bit

When a key is allocated but not really added, there's no
need to go through the entire teardown process. Also, if
adding a key fails, ieee80211_key_link() can take care of
freeing it instead of the (only) caller.

Change-Id: Iedc67f1fd35546b597016ce4bc5e914116e1e4d8
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
3 files changed