Skip to content

Commit

Permalink
Remove useless casts of kmalloc() and kzalloc()
Browse files Browse the repository at this point in the history
Found by coccinelle.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4152 0192ed92-7a03-0410-a25b-9323aeb14dbd
  • Loading branch information
proski committed Aug 3, 2011
1 parent 1c37948 commit c656966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ath/if_ath_radar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions net80211/if_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c656966

Please sign in to comment.