git: 8c2748b922f5 - stable/14 - ath(4): Stop checking for failures from malloc(M_WAITOK)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 04:45:24 UTC
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=8c2748b922f579080d4d8ca88a8ada5512a69035
commit 8c2748b922f579080d4d8ca88a8ada5512a69035
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:24 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 04:44:19 +0000
ath(4): Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852
(cherry picked from commit 3fdf587ab02f33018bd042094e3d0bd4169352ed)
---
sys/dev/ath/if_ath_lna_div.c | 6 ------
sys/dev/ath/if_ath_pci.c | 5 -----
sys/dev/ath/if_ath_spectral.c | 7 -------
3 files changed, 18 deletions(-)
diff --git a/sys/dev/ath/if_ath_lna_div.c b/sys/dev/ath/if_ath_lna_div.c
index 1b20591fc64e..0755bb667716 100644
--- a/sys/dev/ath/if_ath_lna_div.c
+++ b/sys/dev/ath/if_ath_lna_div.c
@@ -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));
diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c
index 72f0a802aa5f..a242eab7a694 100644
--- a/sys/dev/ath/if_ath_pci.c
+++ b/sys/dev/ath/if_ath_pci.c
@@ -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);
}
diff --git a/sys/dev/ath/if_ath_spectral.c b/sys/dev/ath/if_ath_spectral.c
index 58f21b526e93..951d66605981 100644
--- a/sys/dev/ath/if_ath_spectral.c
+++ b/sys/dev/ath/if_ath_spectral.c
@@ -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);