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/dimm.c | |
parent | 8409f942a1f8c28296910b7b1d60f27dd3e03162 (diff) | |
download | lwn-1f975074634a63f014e2b7e76852ee6d6005a91d.tar.gz lwn-1f975074634a63f014e2b7e76852ee6d6005a91d.zip |
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/dimm.c')
-rw-r--r-- | drivers/nvdimm/dimm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c index 94be3ae1d29f..91d9163ee303 100644 --- a/drivers/nvdimm/dimm.c +++ b/drivers/nvdimm/dimm.c @@ -113,7 +113,7 @@ static int nvdimm_probe(struct device *dev) return rc; } -static int nvdimm_remove(struct device *dev) +static void nvdimm_remove(struct device *dev) { struct nvdimm_drvdata *ndd = dev_get_drvdata(dev); @@ -121,8 +121,6 @@ static int nvdimm_remove(struct device *dev) dev_set_drvdata(dev, NULL); nvdimm_bus_unlock(dev); put_ndd(ndd); - - return 0; } static struct nd_device_driver nvdimm_driver = { |