From c6569661e405fcd2f579ad3c4addeaa50f458e47 Mon Sep 17 00:00:00 2001 From: proski Date: Wed, 3 Aug 2011 00:18:57 +0000 Subject: [PATCH] Remove useless casts of kmalloc() and kzalloc() Found by coccinelle. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4152 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath_radar.c | 5 ++--- net80211/if_media.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ath/if_ath_radar.c b/ath/if_ath_radar.c index 039824e..7ea8524 100644 --- a/ath/if_ath_radar.c +++ b/ath/if_ath_radar.c @@ -1701,9 +1701,8 @@ void ath_rp_init(struct ath_softc *sc) ath_rp_clear(sc); - sc->sc_rp = (struct ath_rp *)kzalloc( - sizeof(struct ath_rp) * - ATH_RADAR_PULSE_NR, GFP_KERNEL); + sc->sc_rp = kzalloc(sizeof(struct ath_rp) * ATH_RADAR_PULSE_NR, + GFP_KERNEL); if (sc->sc_rp == NULL) return; diff --git a/net80211/if_media.c b/net80211/if_media.c index 996d021..2a5ce1a 100644 --- a/net80211/if_media.c +++ b/net80211/if_media.c @@ -292,8 +292,8 @@ ifmedia_ioctl(struct net_device *dev, struct ifreq *ifr, return (-EINVAL); if (ifmr->ifm_count != 0) { - kptr = (int *)kmalloc(ifmr->ifm_count * sizeof(int), - GFP_KERNEL); + kptr = kmalloc(ifmr->ifm_count * sizeof(int), + GFP_KERNEL); if (kptr == NULL) return (-ENOMEM);