diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-02-12 18:10:43 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-02-16 19:35:29 -0800 |
commit | 1f975074634a63f014e2b7e76852ee6d6005a91d (patch) | |
tree | 8fa1e0b3eacfb3299bb7384a191067114cffd155 /drivers/nvdimm/pmem.c | |
parent | 8409f942a1f8c28296910b7b1d60f27dd3e03162 (diff) |
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/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 875076b0ea6c..062f0f22bac9 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -564,7 +564,7 @@ static int nd_pmem_probe(struct device *dev) return pmem_attach_disk(dev, ndns); } -static int nd_pmem_remove(struct device *dev) +static void nd_pmem_remove(struct device *dev) { struct pmem_device *pmem = dev_get_drvdata(dev); @@ -579,8 +579,6 @@ static int nd_pmem_remove(struct device *dev) pmem->bb_state = NULL; } nvdimm_flush(to_nd_region(dev->parent), NULL); - - return 0; } static void nd_pmem_shutdown(struct device *dev) |