summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/region.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-02-12 20:10:43 +0300
committerDan Williams <dan.j.williams@intel.com>2021-02-17 06:35:29 +0300
commit1f975074634a63f014e2b7e76852ee6d6005a91d (patch)
tree8fa1e0b3eacfb3299bb7384a191067114cffd155 /drivers/nvdimm/region.c
parent8409f942a1f8c28296910b7b1d60f27dd3e03162 (diff)
downloadlinux-1f975074634a63f014e2b7e76852ee6d6005a91d.tar.xz
libnvdimm: Make remove callback return void
All drivers return 0 in their remove callback and the driver core ignores the return value of nvdimm_bus_remove() anyhow. So simplify by changing the driver remove callback to return void and return 0 unconditionally to the upper layer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20210212171043.2136580-2-u.kleine-koenig@pengutronix.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/region.c')
-rw-r--r--drivers/nvdimm/region.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvdimm/region.c b/drivers/nvdimm/region.c
index bfce87ed72ab..e0c34120df37 100644
--- a/drivers/nvdimm/region.c
+++ b/drivers/nvdimm/region.c
@@ -87,7 +87,7 @@ static int child_unregister(struct device *dev, void *data)
return 0;
}
-static int nd_region_remove(struct device *dev)
+static void nd_region_remove(struct device *dev)
{
struct nd_region *nd_region = to_nd_region(dev);
@@ -108,8 +108,6 @@ static int nd_region_remove(struct device *dev)
*/
sysfs_put(nd_region->bb_state);
nd_region->bb_state = NULL;
-
- return 0;
}
static int child_notify(struct device *dev, void *data)