[PATCH 02/14] mtd: spi-nor: aspeed-smc: Make aspeed_smc_unregister() return void
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Fri Jun 3 14:07:46 PDT 2022
The function returns zero unconditionally, so simplify to make it
obvious there is no error to handle in the callers.
This is a preparation for making platform remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
drivers/mtd/spi-nor/controllers/aspeed-smc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/spi-nor/controllers/aspeed-smc.c b/drivers/mtd/spi-nor/controllers/aspeed-smc.c
index acfe010f9dd7..bd149104533a 100644
--- a/drivers/mtd/spi-nor/controllers/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/controllers/aspeed-smc.c
@@ -399,7 +399,7 @@ static ssize_t aspeed_smc_write_user(struct spi_nor *nor, loff_t to,
return len;
}
-static int aspeed_smc_unregister(struct aspeed_smc_controller *controller)
+static void aspeed_smc_unregister(struct aspeed_smc_controller *controller)
{
struct aspeed_smc_chip *chip;
int n;
@@ -409,13 +409,13 @@ static int aspeed_smc_unregister(struct aspeed_smc_controller *controller)
if (chip)
mtd_device_unregister(&chip->nor.mtd);
}
-
- return 0;
}
static int aspeed_smc_remove(struct platform_device *dev)
{
- return aspeed_smc_unregister(platform_get_drvdata(dev));
+ aspeed_smc_unregister(platform_get_drvdata(dev));
+
+ return 0;
}
static const struct of_device_id aspeed_smc_matches[] = {
--
2.36.1
More information about the linux-mtd
mailing list