flexspi: Stop checking for failures from malloc(M_WAITOK)

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852

(cherry picked from commit d1a89bd9b6eb1524902b619fa092c7d6de63e623)
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:27 +08:00
parent e78c315e89
commit 6515ef4d2b

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;