mtd: do not attach already attached UBI
in mtd_detect we do not check if the mtd is already attached to UBI. If
it is we get the error:

ERROR: ubi: mtd0 is already attached to ubi0

Check before trying to attach it to avoid this message.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 55e61ea commit 8e322f9d7c99232531a7069783875355ef386e40
@Sascha Hauer Sascha Hauer authored on 2 Oct 2018
Showing 1 changed file
View
drivers/mtd/core.c