Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9650b9be authored by Brian Norris's avatar Brian Norris
Browse files

mtd: m25p80: fixup device removal failure path



Device removal should fail if MTD unregistration fails.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
parent d367e37e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1125,9 +1125,7 @@ static int m25p_remove(struct spi_device *spi)
	struct m25p	*flash = spi_get_drvdata(spi);

	/* Clean up MTD stuff. */
	mtd_device_unregister(&flash->mtd);

	return 0;
	return mtd_device_unregister(&flash->mtd);
}