Remove useless casts of kmalloc() and kzalloc()
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 3 Aug 2011 00:18:57 +0000 (00:18 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 3 Aug 2011 00:18:57 +0000 (00:18 +0000)
Found by coccinelle.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4152 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath_radar.c
net80211/if_media.c

index 039824e9d469dec145d888647d4f7629b2d04c70..7ea852435dc1234e1eaa7687eaa31a71a94185b4 100644 (file)
@@ -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;
index 996d021ea49dba24e05bc7a75a5a6b7a3fd032bd..2a5ce1af63f87df519bb227d6b7e36efef6f166d 100644 (file)
@@ -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);