mirror of
https://github.com/proski/madwifi
synced 2024-11-21 22:11:32 +03:00
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
This commit is contained in:
parent
1c37948b92
commit
c6569661e4
@ -1701,9 +1701,8 @@ void ath_rp_init(struct ath_softc *sc)
|
|||||||
|
|
||||||
ath_rp_clear(sc);
|
ath_rp_clear(sc);
|
||||||
|
|
||||||
sc->sc_rp = (struct ath_rp *)kzalloc(
|
sc->sc_rp = kzalloc(sizeof(struct ath_rp) * ATH_RADAR_PULSE_NR,
|
||||||
sizeof(struct ath_rp) *
|
GFP_KERNEL);
|
||||||
ATH_RADAR_PULSE_NR, GFP_KERNEL);
|
|
||||||
|
|
||||||
if (sc->sc_rp == NULL)
|
if (sc->sc_rp == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -292,8 +292,8 @@ ifmedia_ioctl(struct net_device *dev, struct ifreq *ifr,
|
|||||||
return (-EINVAL);
|
return (-EINVAL);
|
||||||
|
|
||||||
if (ifmr->ifm_count != 0) {
|
if (ifmr->ifm_count != 0) {
|
||||||
kptr = (int *)kmalloc(ifmr->ifm_count * sizeof(int),
|
kptr = kmalloc(ifmr->ifm_count * sizeof(int),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
if (kptr == NULL)
|
if (kptr == NULL)
|
||||||
return (-ENOMEM);
|
return (-ENOMEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user