git: e06e2c840747 - main - altera: Stop checking for failures from malloc(M_WAITOK)

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 03 Sep 2024 10:27:02 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=e06e2c84074740a0087193d5929d09f1bc7e1c4b

commit e06e2c84074740a0087193d5929d09f1bc7e1c4b
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:24 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-03 10:25:24 +0000

    altera: Stop checking for failures from malloc(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
---
 sys/dev/altera/msgdma/msgdma.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/dev/altera/msgdma/msgdma.c b/sys/dev/altera/msgdma/msgdma.c
index bb35d7315b6c..c5c75a5fb5e1 100644
--- a/sys/dev/altera/msgdma/msgdma.c
+++ b/sys/dev/altera/msgdma/msgdma.c
@@ -356,11 +356,6 @@ msgdma_desc_alloc(struct msgdma_softc *sc, struct msgdma_channel *chan,
 	/* Descriptors. */
 	chan->descs = malloc(nsegments * sizeof(struct msgdma_desc *),
 	    M_DEVBUF, (M_WAITOK | M_ZERO));
-	if (chan->descs == NULL) {
-		device_printf(sc->dev,
-		    "%s: Can't allocate memory.\n", __func__);
-		return (-1);
-	}
 	chan->dma_map = malloc(nsegments * sizeof(bus_dmamap_t),
 	    M_DEVBUF, (M_WAITOK | M_ZERO));
 	chan->descs_phys = malloc(nsegments * sizeof(bus_dma_segment_t),