mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
ath(4): Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
This commit is contained in:
parent
e06e2c8407
commit
3fdf587ab0
|
@ -96,12 +96,6 @@ ath_lna_div_attach(struct ath_softc *sc)
|
|||
|
||||
ss = malloc(sizeof(struct if_ath_ant_comb_state),
|
||||
M_TEMP, M_WAITOK | M_ZERO);
|
||||
if (ss == NULL) {
|
||||
device_printf(sc->sc_dev, "%s: failed to allocate\n",
|
||||
__func__);
|
||||
/* Don't fail at this point */
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Fetch the hardware configuration */
|
||||
OS_MEMZERO(&div_ant_conf, sizeof(div_ant_conf));
|
||||
|
|
|
@ -269,11 +269,6 @@ ath_pci_attach(device_t dev)
|
|||
__func__, fw->data);
|
||||
sc->sc_eepromdata =
|
||||
malloc(fw->datasize, M_TEMP, M_WAITOK | M_ZERO);
|
||||
if (! sc->sc_eepromdata) {
|
||||
device_printf(dev, "%s: can't malloc eepromdata\n",
|
||||
__func__);
|
||||
goto bad4;
|
||||
}
|
||||
memcpy(sc->sc_eepromdata, fw->data, fw->datasize);
|
||||
firmware_put(fw, 0);
|
||||
}
|
||||
|
|
|
@ -112,13 +112,6 @@ ath_spectral_attach(struct ath_softc *sc)
|
|||
|
||||
ss = malloc(sizeof(struct ath_spectral_state),
|
||||
M_TEMP, M_WAITOK | M_ZERO);
|
||||
|
||||
if (ss == NULL) {
|
||||
device_printf(sc->sc_dev, "%s: failed to alloc memory\n",
|
||||
__func__);
|
||||
return (-ENOMEM);
|
||||
}
|
||||
|
||||
sc->sc_spectral = ss;
|
||||
|
||||
(void) ath_hal_spectral_get_config(sc->sc_ah, &ss->spectral_state);
|
||||
|
|
Loading…
Reference in a new issue