git: 68c96d15d3e2 - stable/13 - sume(4): Stop checking for failures from malloc(M_WAITOK)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 05:08:35 UTC
The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=68c96d15d3e2107bd5b60825bae32ab3cd848593 commit 68c96d15d3e2107bd5b60825bae32ab3cd848593 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 05:05:38 +0000 sume(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 761339c5544a360df9d3bab70675fea246eb6a83) (cherry picked from commit 140a0c8f39816648719d9670fb641c657732439e) --- sys/dev/sume/if_sume.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/sume/if_sume.c b/sys/dev/sume/if_sume.c index 59e4dbc9d02e..0868a5b00e87 100644 --- a/sys/dev/sume/if_sume.c +++ b/sys/dev/sume/if_sume.c @@ -1203,16 +1203,11 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, { struct riffa_chnl_dir **rp; bus_addr_t hw_addr; - int error, ch; + int ch; device_t dev = adapter->dev; - error = ENOMEM; *p = malloc(SUME_RIFFA_CHANNELS * sizeof(struct riffa_chnl_dir *), M_SUME, M_ZERO | M_WAITOK); - if (*p == NULL) { - device_printf(dev, "malloc(%s) failed.\n", dir); - return (error); - } rp = *p; /* Allocate the chnl_dir structs themselves. */ @@ -1220,11 +1215,6 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, /* One direction. */ rp[ch] = malloc(sizeof(struct riffa_chnl_dir), M_SUME, M_ZERO | M_WAITOK); - if (rp[ch] == NULL) { - device_printf(dev, "malloc(%s[%d]) riffa_chnl_dir " - "failed.\n", dir, ch); - return (error); - } int err = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0,