[U-Boot] [PATCH v3 04/11] mtd: sf: Make sure we don't register the same device twice

Jagan Teki jagan at amarulasolutions.com
Thu Nov 22 07:04:15 UTC 2018


On Tue, Nov 20, 2018 at 2:35 AM Boris Brezillon
<boris.brezillon at bootlin.com> wrote:
>
> spi_flash_mtd_register() can be called several times and each time it
> will register the same mtd_info instance like if it was a new one.
> The MTD ID allocation gets crazy when that happens, so let's track the
> status of the sf_mtd_info object to avoid that.
>
> Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
> Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>
> ---
> Changes in v3:
> - None
>
> Changes in v2
> - None
> ---

Reviewed-by: Jagan Teki <jagan at openedev.com>


More information about the U-Boot mailing list