Skip to content

Commit

Permalink
mac80211: use ERR_CAST()
Browse files Browse the repository at this point in the history
No need for ERR_PTR(PTR_ERR()) since there's ERR_CAST, use it.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Sep 26, 2013
1 parent c7c7106 commit c5dc164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ ieee80211_gtk_rekey_add(struct ieee80211_vif *vif,
keyconf->keylen, keyconf->key,
0, NULL);
if (IS_ERR(key))
return ERR_PTR(PTR_ERR(key));
return ERR_CAST(key);

if (sdata->u.mgd.mfp != IEEE80211_MFP_DISABLED)
key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT;
Expand Down

0 comments on commit c5dc164

Please sign in to comment.