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)
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:33 +08:00
parent a1075ea2a3
commit 140a0c8f39

View file

@ -1196,16 +1196,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. */
@ -1213,11 +1208,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,