From 6515ef4d2b4251ff4c628577e93b3bd5c1ed480e Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Tue, 3 Sep 2024 18:25:27 +0800 Subject: [PATCH] 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) --- sys/dev/flash/flexspi/flex_spi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c index 106a7845b2a..b4c2ce985e0 100644 --- a/sys/dev/flash/flexspi/flex_spi.c +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -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;