[PATCH 1/1] mtd: spi_flash_free()

Simon Glass sjg at chromium.org
Sat Mar 27 04:18:46 CET 2021


dfu_free_entities() invoking dfu_free_entity_sf() has let to segementation
faults due to double freeing the same device.

spi_flash_free() is not relevant for the driver model but exists only for
compatibility with old drivers.

We must not remove any device here:

* The device may still be referenced.
* We don't want to have to probe again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 drivers/mtd/spi/sf-uclass.c | 5 -----
 include/spi_flash.h         | 4 +++-
 2 files changed, 3 insertions(+), 6 deletions(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list