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:
Zhenlei Huang 2024-09-03 18:25:24 +08:00
parent e06e2c8407
commit 3fdf587ab0
3 changed files with 0 additions and 18 deletions

View file

@ -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));

View file

@ -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);
}

View file

@ -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);