From: Johannes Berg Date: Wed, 28 Aug 2013 17:03:36 +0000 (+0200) Subject: mac80211: use ERR_CAST() X-Git-Tag: v3.13-rc1~105^2~181^2^2~38^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5dc164df6187e845f1a7c0542f5106c74ff5a92;p=thirdparty%2Fkernel%2Flinux.git mac80211: use ERR_CAST() No need for ERR_PTR(PTR_ERR()) since there's ERR_CAST, use it. Reported-by: Fengguang Wu Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 620677e897bd0..3e51dd7d98b34 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -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;