diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-07-13 21:35:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-21 11:53:41 +0200 |
commit | a7bdb9a9767360c2b4096bbb379e73022b274483 (patch) | |
tree | 167d1241fd3eaacb1837bfbd5aef60951a11d809 /drivers/s390/cio/css.c | |
parent | PCI: endpoint: Make struct pci_epf_driver::remove return void (diff) | |
download | linux-a7bdb9a9767360c2b4096bbb379e73022b274483.tar.xz linux-a7bdb9a9767360c2b4096bbb379e73022b274483.zip |
s390/cio: Make struct css_driver::remove return void
The driver core ignores the return value of css_remove()
(because there is only little it can do when a device disappears) and
all callbacks return 0 anyhow.
So make it impossible for future drivers to return an unused error code
by changing the remove prototype to return void.
The real motivation for this change is the quest to make struct
bus_type::remove return void, too.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210713193522.1770306-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index a974943c27da..092fd1ea5799 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -1374,12 +1374,13 @@ static int css_probe(struct device *dev) static int css_remove(struct device *dev) { struct subchannel *sch; - int ret; sch = to_subchannel(dev); - ret = sch->driver->remove ? sch->driver->remove(sch) : 0; + if (sch->driver->remove) + sch->driver->remove(sch); sch->driver = NULL; - return ret; + + return 0; } static void css_shutdown(struct device *dev) |