summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices/mchp23k256.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/mchp23k256.c')
-rw-r--r--drivers/mtd/devices/mchp23k256.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index 77c872fd3d83..a8b31bddf14b 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -213,7 +213,9 @@ static int mchp23k256_remove(struct spi_device *spi)
{
struct mchp23k256_flash *flash = spi_get_drvdata(spi);
- return mtd_device_unregister(&flash->mtd);
+ WARN_ON(mtd_device_unregister(&flash->mtd));
+
+ return 0;
}
static const struct of_device_id mchp23k256_of_table[] = {