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-17 04:35:29 +0100 |
commit | 1f975074634a63f014e2b7e76852ee6d6005a91d (patch) | |
tree | 8fa1e0b3eacfb3299bb7384a191067114cffd155 /drivers/nvdimm/blk.c | |
parent | libnvdimm/dimm: Simplify nvdimm_remove() (diff) | |
download | linux-1f975074634a63f014e2b7e76852ee6d6005a91d.tar.xz linux-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/blk.c')
-rw-r--r-- | drivers/nvdimm/blk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 22e5617b2cea..8a53728e13e6 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -310,11 +310,10 @@ static int nd_blk_probe(struct device *dev) return nsblk_attach_disk(nsblk); } -static int nd_blk_remove(struct device *dev) +static void nd_blk_remove(struct device *dev) { if (is_nd_btt(dev)) nvdimm_namespace_detach_btt(to_nd_btt(dev)); - return 0; } static struct nd_device_driver nd_blk_driver = { |