flexspi: 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:27 +08:00
parent 48741f4cec
commit d1a89bd9b6

View file

@ -781,12 +781,6 @@ flex_spi_attach(device_t dev)
}
sc->buf = malloc(sc->erasesize, SECTOR_BUFFER, M_WAITOK);
if (sc->buf == NULL) {
device_printf(sc->dev, "Unable to set up allocate internal buffer\n");
flex_spi_detach(dev);
return (ENOMEM);
}
/* Move it to per-flash */
sc->disk = disk_alloc();
sc->disk->d_open = flex_spi_open;