Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bus: Make remove callback return void

The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix <trix@redhat.com> (For fpga)
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts)
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb)
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media)
Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform)
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Acked-by: Juergen Gross <jgross@suse.com> (For xen)
Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd)
Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb)
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus)
Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio)
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack)
Acked-by: Geoff Levand <geoff@infradead.org> (For ps3)
Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt)
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th)
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia)
Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI)
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr)
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid)
Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa)
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire)
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid)
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox)
Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss)
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC)
Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
fc7a6209 15f83bb0

+93 -243
+1 -2
arch/arm/common/locomo.c
··· 834 834 return ret; 835 835 } 836 836 837 - static int locomo_bus_remove(struct device *dev) 837 + static void locomo_bus_remove(struct device *dev) 838 838 { 839 839 struct locomo_dev *ldev = LOCOMO_DEV(dev); 840 840 struct locomo_driver *drv = LOCOMO_DRV(dev->driver); 841 841 842 842 if (drv->remove) 843 843 drv->remove(ldev); 844 - return 0; 845 844 } 846 845 847 846 struct bus_type locomo_bus_type = {
+1 -3
arch/arm/common/sa1111.c
··· 1364 1364 return ret; 1365 1365 } 1366 1366 1367 - static int sa1111_bus_remove(struct device *dev) 1367 + static void sa1111_bus_remove(struct device *dev) 1368 1368 { 1369 1369 struct sa1111_dev *sadev = to_sa1111_device(dev); 1370 1370 struct sa1111_driver *drv = SA1111_DRV(dev->driver); 1371 1371 1372 1372 if (drv->remove) 1373 1373 drv->remove(sadev); 1374 - 1375 - return 0; 1376 1374 } 1377 1375 1378 1376 struct bus_type sa1111_bus_type = {
+1 -3
arch/arm/mach-rpc/ecard.c
··· 1052 1052 return ret; 1053 1053 } 1054 1054 1055 - static int ecard_drv_remove(struct device *dev) 1055 + static void ecard_drv_remove(struct device *dev) 1056 1056 { 1057 1057 struct expansion_card *ec = ECARD_DEV(dev); 1058 1058 struct ecard_driver *drv = ECARD_DRV(dev->driver); ··· 1067 1067 ec->ops = &ecard_default_ops; 1068 1068 barrier(); 1069 1069 ec->irq_data = NULL; 1070 - 1071 - return 0; 1072 1070 } 1073 1071 1074 1072 /*
+1 -2
arch/mips/sgi-ip22/ip22-gio.c
··· 143 143 return error; 144 144 } 145 145 146 - static int gio_device_remove(struct device *dev) 146 + static void gio_device_remove(struct device *dev) 147 147 { 148 148 struct gio_device *gio_dev = to_gio_device(dev); 149 149 struct gio_driver *drv = to_gio_driver(dev->driver); 150 150 151 151 if (dev->driver && drv->remove) 152 152 drv->remove(gio_dev); 153 - return 0; 154 153 } 155 154 156 155 static void gio_device_shutdown(struct device *dev)
+2 -3
arch/parisc/kernel/drivers.c
··· 133 133 return rc; 134 134 } 135 135 136 - static int __exit parisc_driver_remove(struct device *dev) 136 + static void __exit parisc_driver_remove(struct device *dev) 137 137 { 138 138 struct parisc_device *pa_dev = to_parisc_device(dev); 139 139 struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); 140 + 140 141 if (pa_drv->remove) 141 142 pa_drv->remove(pa_dev); 142 - 143 - return 0; 144 143 } 145 144 146 145
+1 -2
arch/powerpc/platforms/ps3/system-bus.c
··· 381 381 return result; 382 382 } 383 383 384 - static int ps3_system_bus_remove(struct device *_dev) 384 + static void ps3_system_bus_remove(struct device *_dev) 385 385 { 386 386 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); 387 387 struct ps3_system_bus_driver *drv; ··· 399 399 __func__, __LINE__, drv->core.name); 400 400 401 401 pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core)); 402 - return 0; 403 402 } 404 403 405 404 static void ps3_system_bus_shutdown(struct device *_dev)
+1 -2
arch/powerpc/platforms/pseries/ibmebus.c
··· 366 366 return error; 367 367 } 368 368 369 - static int ibmebus_bus_device_remove(struct device *dev) 369 + static void ibmebus_bus_device_remove(struct device *dev) 370 370 { 371 371 struct platform_device *of_dev = to_platform_device(dev); 372 372 struct platform_driver *drv = to_platform_driver(dev->driver); 373 373 374 374 if (dev->driver && drv->remove) 375 375 drv->remove(of_dev); 376 - return 0; 377 376 } 378 377 379 378 static void ibmebus_bus_device_shutdown(struct device *dev)
+1 -2
arch/powerpc/platforms/pseries/vio.c
··· 1257 1257 } 1258 1258 1259 1259 /* convert from struct device to struct vio_dev and pass to driver. */ 1260 - static int vio_bus_remove(struct device *dev) 1260 + static void vio_bus_remove(struct device *dev) 1261 1261 { 1262 1262 struct vio_dev *viodev = to_vio_dev(dev); 1263 1263 struct vio_driver *viodrv = to_vio_driver(dev->driver); ··· 1276 1276 vio_cmo_bus_remove(viodev); 1277 1277 1278 1278 put_device(devptr); 1279 - return 0; 1280 1279 } 1281 1280 1282 1281 static void vio_bus_shutdown(struct device *dev)
+1 -3
arch/sparc/kernel/vio.c
··· 93 93 return drv->probe(vdev, id); 94 94 } 95 95 96 - static int vio_device_remove(struct device *dev) 96 + static void vio_device_remove(struct device *dev) 97 97 { 98 98 struct vio_dev *vdev = to_vio_dev(dev); 99 99 struct vio_driver *drv = to_vio_driver(dev->driver); ··· 107 107 108 108 drv->remove(vdev); 109 109 } 110 - 111 - return 0; 112 110 } 113 111 114 112 static ssize_t devspec_show(struct device *dev,
+1 -2
drivers/acpi/bus.c
··· 1019 1019 return 0; 1020 1020 } 1021 1021 1022 - static int acpi_device_remove(struct device *dev) 1022 + static void acpi_device_remove(struct device *dev) 1023 1023 { 1024 1024 struct acpi_device *acpi_dev = to_acpi_device(dev); 1025 1025 struct acpi_driver *acpi_drv = acpi_dev->driver; ··· 1034 1034 acpi_dev->driver_data = NULL; 1035 1035 1036 1036 put_device(dev); 1037 - return 0; 1038 1037 } 1039 1038 1040 1039 struct bus_type acpi_bus_type = {
+1 -3
drivers/amba/bus.c
··· 219 219 return ret; 220 220 } 221 221 222 - static int amba_remove(struct device *dev) 222 + static void amba_remove(struct device *dev) 223 223 { 224 224 struct amba_device *pcdev = to_amba_device(dev); 225 225 struct amba_driver *drv = to_amba_driver(dev->driver); ··· 236 236 237 237 amba_put_disable_pclk(pcdev); 238 238 dev_pm_domain_detach(dev, true); 239 - 240 - return 0; 241 239 } 242 240 243 241 static void amba_shutdown(struct device *dev)
+1 -3
drivers/base/auxiliary.c
··· 79 79 return ret; 80 80 } 81 81 82 - static int auxiliary_bus_remove(struct device *dev) 82 + static void auxiliary_bus_remove(struct device *dev) 83 83 { 84 84 struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver); 85 85 struct auxiliary_device *auxdev = to_auxiliary_dev(dev); ··· 87 87 if (auxdrv->remove) 88 88 auxdrv->remove(auxdev); 89 89 dev_pm_domain_detach(dev, true); 90 - 91 - return 0; 92 90 } 93 91 94 92 static void auxiliary_bus_shutdown(struct device *dev)
+1 -3
drivers/base/isa.c
··· 46 46 return 0; 47 47 } 48 48 49 - static int isa_bus_remove(struct device *dev) 49 + static void isa_bus_remove(struct device *dev) 50 50 { 51 51 struct isa_driver *isa_driver = dev->platform_data; 52 52 53 53 if (isa_driver && isa_driver->remove) 54 54 isa_driver->remove(dev, to_isa_dev(dev)->id); 55 - 56 - return 0; 57 55 } 58 56 59 57 static void isa_bus_shutdown(struct device *dev)
+1 -3
drivers/base/platform.c
··· 1438 1438 return ret; 1439 1439 } 1440 1440 1441 - static int platform_remove(struct device *_dev) 1441 + static void platform_remove(struct device *_dev) 1442 1442 { 1443 1443 struct platform_driver *drv = to_platform_driver(_dev->driver); 1444 1444 struct platform_device *dev = to_platform_device(_dev); ··· 1450 1450 dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n"); 1451 1451 } 1452 1452 dev_pm_domain_detach(_dev, true); 1453 - 1454 - return 0; 1455 1453 } 1456 1454 1457 1455 static void platform_shutdown(struct device *_dev)
+2 -4
drivers/bcma/main.c
··· 27 27 28 28 static int bcma_bus_match(struct device *dev, struct device_driver *drv); 29 29 static int bcma_device_probe(struct device *dev); 30 - static int bcma_device_remove(struct device *dev); 30 + static void bcma_device_remove(struct device *dev); 31 31 static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env); 32 32 33 33 static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) ··· 614 614 return err; 615 615 } 616 616 617 - static int bcma_device_remove(struct device *dev) 617 + static void bcma_device_remove(struct device *dev) 618 618 { 619 619 struct bcma_device *core = container_of(dev, struct bcma_device, dev); 620 620 struct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver, ··· 623 623 if (adrv->remove) 624 624 adrv->remove(core); 625 625 put_device(dev); 626 - 627 - return 0; 628 626 } 629 627 630 628 static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/bus/sunxi-rsb.c
··· 169 169 return drv->probe(rdev); 170 170 } 171 171 172 - static int sunxi_rsb_device_remove(struct device *dev) 172 + static void sunxi_rsb_device_remove(struct device *dev) 173 173 { 174 174 const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver); 175 175 176 176 drv->remove(to_sunxi_rsb_device(dev)); 177 - 178 - return 0; 179 177 } 180 178 181 179 static struct bus_type sunxi_rsb_bus = {
+1 -2
drivers/cxl/core.c
··· 1034 1034 return to_cxl_drv(dev->driver)->probe(dev); 1035 1035 } 1036 1036 1037 - static int cxl_bus_remove(struct device *dev) 1037 + static void cxl_bus_remove(struct device *dev) 1038 1038 { 1039 1039 struct cxl_driver *cxl_drv = to_cxl_drv(dev->driver); 1040 1040 1041 1041 if (cxl_drv->remove) 1042 1042 cxl_drv->remove(dev); 1043 - return 0; 1044 1043 } 1045 1044 1046 1045 struct bus_type cxl_bus_type = {
+1 -3
drivers/dax/bus.c
··· 172 172 return 0; 173 173 } 174 174 175 - static int dax_bus_remove(struct device *dev) 175 + static void dax_bus_remove(struct device *dev) 176 176 { 177 177 struct dax_device_driver *dax_drv = to_dax_drv(dev->driver); 178 178 struct dev_dax *dev_dax = to_dev_dax(dev); 179 179 180 180 if (dax_drv->remove) 181 181 dax_drv->remove(dev_dax); 182 - 183 - return 0; 184 182 } 185 183 186 184 static struct bus_type dax_bus_type = {
+1 -3
drivers/dma/idxd/sysfs.c
··· 260 260 dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev)); 261 261 } 262 262 263 - static int idxd_config_bus_remove(struct device *dev) 263 + static void idxd_config_bus_remove(struct device *dev) 264 264 { 265 265 int rc; 266 266 ··· 305 305 dev_info(dev, "Device %s disabled\n", dev_name(dev)); 306 306 307 307 } 308 - 309 - return 0; 310 308 } 311 309 312 310 static void idxd_config_bus_shutdown(struct device *dev)
+1 -3
drivers/firewire/core-device.c
··· 187 187 return driver->probe(fw_unit(dev), unit_match(dev, dev->driver)); 188 188 } 189 189 190 - static int fw_unit_remove(struct device *dev) 190 + static void fw_unit_remove(struct device *dev) 191 191 { 192 192 struct fw_driver *driver = 193 193 container_of(dev->driver, struct fw_driver, driver); 194 194 195 195 driver->remove(fw_unit(dev)); 196 - 197 - return 0; 198 196 } 199 197 200 198 static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
+1 -3
drivers/firmware/arm_scmi/bus.c
··· 111 111 return scmi_drv->probe(scmi_dev); 112 112 } 113 113 114 - static int scmi_dev_remove(struct device *dev) 114 + static void scmi_dev_remove(struct device *dev) 115 115 { 116 116 struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver); 117 117 struct scmi_device *scmi_dev = to_scmi_dev(dev); 118 118 119 119 if (scmi_drv->remove) 120 120 scmi_drv->remove(scmi_dev); 121 - 122 - return 0; 123 121 } 124 122 125 123 static struct bus_type scmi_bus_type = {
+1 -3
drivers/firmware/google/coreboot_table.c
··· 44 44 return ret; 45 45 } 46 46 47 - static int coreboot_bus_remove(struct device *dev) 47 + static void coreboot_bus_remove(struct device *dev) 48 48 { 49 49 struct coreboot_device *device = CB_DEV(dev); 50 50 struct coreboot_driver *driver = CB_DRV(dev->driver); 51 51 52 52 if (driver->remove) 53 53 driver->remove(device); 54 - 55 - return 0; 56 54 } 57 55 58 56 static struct bus_type coreboot_bus_type = {
+1 -3
drivers/fpga/dfl.c
··· 284 284 return ddrv->probe(ddev); 285 285 } 286 286 287 - static int dfl_bus_remove(struct device *dev) 287 + static void dfl_bus_remove(struct device *dev) 288 288 { 289 289 struct dfl_driver *ddrv = to_dfl_drv(dev->driver); 290 290 struct dfl_device *ddev = to_dfl_dev(dev); 291 291 292 292 if (ddrv->remove) 293 293 ddrv->remove(ddev); 294 - 295 - return 0; 296 294 } 297 295 298 296 static int dfl_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/hid/hid-core.c
··· 2302 2302 return ret; 2303 2303 } 2304 2304 2305 - static int hid_device_remove(struct device *dev) 2305 + static void hid_device_remove(struct device *dev) 2306 2306 { 2307 2307 struct hid_device *hdev = to_hid_device(dev); 2308 2308 struct hid_driver *hdrv; ··· 2322 2322 2323 2323 if (!hdev->io_started) 2324 2324 up(&hdev->driver_input_lock); 2325 - 2326 - return 0; 2327 2325 } 2328 2326 2329 2327 static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
+1 -3
drivers/hid/intel-ish-hid/ishtp/bus.c
··· 255 255 * 256 256 * Return: Return value from driver remove() call. 257 257 */ 258 - static int ishtp_cl_device_remove(struct device *dev) 258 + static void ishtp_cl_device_remove(struct device *dev) 259 259 { 260 260 struct ishtp_cl_device *device = to_ishtp_cl_device(dev); 261 261 struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); ··· 267 267 268 268 if (driver->remove) 269 269 driver->remove(device); 270 - 271 - return 0; 272 270 } 273 271 274 272 /**
+1 -4
drivers/hv/vmbus_drv.c
··· 922 922 /* 923 923 * vmbus_remove - Remove a vmbus device 924 924 */ 925 - static int vmbus_remove(struct device *child_device) 925 + static void vmbus_remove(struct device *child_device) 926 926 { 927 927 struct hv_driver *drv; 928 928 struct hv_device *dev = device_to_hv_device(child_device); ··· 932 932 if (drv->remove) 933 933 drv->remove(dev); 934 934 } 935 - 936 - return 0; 937 935 } 938 - 939 936 940 937 /* 941 938 * vmbus_shutdown - Shutdown a vmbus device
+1 -3
drivers/hwtracing/intel_th/core.c
··· 95 95 96 96 static void intel_th_device_remove(struct intel_th_device *thdev); 97 97 98 - static int intel_th_remove(struct device *dev) 98 + static void intel_th_remove(struct device *dev) 99 99 { 100 100 struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver); 101 101 struct intel_th_device *thdev = to_intel_th_device(dev); ··· 164 164 pm_runtime_disable(dev); 165 165 pm_runtime_set_active(dev); 166 166 pm_runtime_enable(dev); 167 - 168 - return 0; 169 167 } 170 168 171 169 static struct bus_type intel_th_bus = {
+1 -4
drivers/i2c/i2c-core-base.c
··· 601 601 return status; 602 602 } 603 603 604 - static int i2c_device_remove(struct device *dev) 604 + static void i2c_device_remove(struct device *dev) 605 605 { 606 606 struct i2c_client *client = to_i2c_client(dev); 607 607 struct i2c_adapter *adap; ··· 631 631 client->irq = 0; 632 632 if (client->flags & I2C_CLIENT_HOST_NOTIFY) 633 633 pm_runtime_put(&client->adapter->dev); 634 - 635 - /* return always 0 because there is WIP to make remove-functions void */ 636 - return 0; 637 634 } 638 635 639 636 #ifdef CONFIG_PM_SLEEP
+1 -3
drivers/i3c/master.c
··· 322 322 return driver->probe(i3cdev); 323 323 } 324 324 325 - static int i3c_device_remove(struct device *dev) 325 + static void i3c_device_remove(struct device *dev) 326 326 { 327 327 struct i3c_device *i3cdev = dev_to_i3cdev(dev); 328 328 struct i3c_driver *driver = drv_to_i3cdrv(dev->driver); ··· 331 331 driver->remove(i3cdev); 332 332 333 333 i3c_device_free_ibi(i3cdev); 334 - 335 - return 0; 336 334 } 337 335 338 336 struct bus_type i3c_bus_type = {
+1 -2
drivers/input/gameport/gameport.c
··· 697 697 return gameport->drv ? 0 : -ENODEV; 698 698 } 699 699 700 - static int gameport_driver_remove(struct device *dev) 700 + static void gameport_driver_remove(struct device *dev) 701 701 { 702 702 struct gameport *gameport = to_gameport_port(dev); 703 703 struct gameport_driver *drv = to_gameport_driver(dev->driver); 704 704 705 705 drv->disconnect(gameport); 706 - return 0; 707 706 } 708 707 709 708 static void gameport_attach_driver(struct gameport_driver *drv)
+1 -2
drivers/input/serio/serio.c
··· 778 778 return serio_connect_driver(serio, drv); 779 779 } 780 780 781 - static int serio_driver_remove(struct device *dev) 781 + static void serio_driver_remove(struct device *dev) 782 782 { 783 783 struct serio *serio = to_serio_port(dev); 784 784 785 785 serio_disconnect_driver(serio); 786 - return 0; 787 786 } 788 787 789 788 static void serio_cleanup(struct serio *serio)
+1 -3
drivers/ipack/ipack.c
··· 67 67 return drv->ops->probe(dev); 68 68 } 69 69 70 - static int ipack_bus_remove(struct device *device) 70 + static void ipack_bus_remove(struct device *device) 71 71 { 72 72 struct ipack_device *dev = to_ipack_dev(device); 73 73 struct ipack_driver *drv = to_ipack_driver(device->driver); 74 74 75 75 if (drv->ops->remove) 76 76 drv->ops->remove(dev); 77 - 78 - return 0; 79 77 } 80 78 81 79 static int ipack_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/macintosh/macio_asic.c
··· 88 88 return error; 89 89 } 90 90 91 - static int macio_device_remove(struct device *dev) 91 + static void macio_device_remove(struct device *dev) 92 92 { 93 93 struct macio_dev * macio_dev = to_macio_device(dev); 94 94 struct macio_driver * drv = to_macio_driver(dev->driver); ··· 96 96 if (dev->driver && drv->remove) 97 97 drv->remove(macio_dev); 98 98 macio_dev_put(macio_dev); 99 - 100 - return 0; 101 99 } 102 100 103 101 static void macio_device_shutdown(struct device *dev)
+1 -3
drivers/mcb/mcb-core.c
··· 77 77 return ret; 78 78 } 79 79 80 - static int mcb_remove(struct device *dev) 80 + static void mcb_remove(struct device *dev) 81 81 { 82 82 struct mcb_driver *mdrv = to_mcb_driver(dev->driver); 83 83 struct mcb_device *mdev = to_mcb_device(dev); ··· 89 89 module_put(carrier_mod); 90 90 91 91 put_device(&mdev->dev); 92 - 93 - return 0; 94 92 } 95 93 96 94 static void mcb_shutdown(struct device *dev)
+1 -2
drivers/media/pci/bt8xx/bttv-gpio.c
··· 46 46 return sub->probe ? sub->probe(sdev) : -ENODEV; 47 47 } 48 48 49 - static int bttv_sub_remove(struct device *dev) 49 + static void bttv_sub_remove(struct device *dev) 50 50 { 51 51 struct bttv_sub_device *sdev = to_bttv_sub_dev(dev); 52 52 struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver); 53 53 54 54 if (sub->remove) 55 55 sub->remove(sdev); 56 - return 0; 57 56 } 58 57 59 58 struct bus_type bttv_sub_bus_type = {
+1 -2
drivers/memstick/core/memstick.c
··· 91 91 return rc; 92 92 } 93 93 94 - static int memstick_device_remove(struct device *dev) 94 + static void memstick_device_remove(struct device *dev) 95 95 { 96 96 struct memstick_dev *card = container_of(dev, struct memstick_dev, 97 97 dev); ··· 105 105 } 106 106 107 107 put_device(dev); 108 - return 0; 109 108 } 110 109 111 110 #ifdef CONFIG_PM
+1 -2
drivers/mfd/mcp-core.c
··· 33 33 return drv->probe(mcp); 34 34 } 35 35 36 - static int mcp_bus_remove(struct device *dev) 36 + static void mcp_bus_remove(struct device *dev) 37 37 { 38 38 struct mcp *mcp = to_mcp(dev); 39 39 struct mcp_driver *drv = to_mcp_driver(dev->driver); 40 40 41 41 drv->remove(mcp); 42 - return 0; 43 42 } 44 43 45 44 static struct bus_type mcp_bus_type = {
+1 -3
drivers/misc/mei/bus.c
··· 884 884 * 885 885 * Return: 0 on success; < 0 otherwise 886 886 */ 887 - static int mei_cl_device_remove(struct device *dev) 887 + static void mei_cl_device_remove(struct device *dev) 888 888 { 889 889 struct mei_cl_device *cldev = to_mei_cl_device(dev); 890 890 struct mei_cl_driver *cldrv = to_mei_cl_driver(dev->driver); ··· 896 896 897 897 mei_cl_bus_module_put(cldev); 898 898 module_put(THIS_MODULE); 899 - 900 - return 0; 901 899 } 902 900 903 901 static ssize_t name_show(struct device *dev, struct device_attribute *a,
+1 -2
drivers/misc/tifm_core.c
··· 87 87 return; 88 88 } 89 89 90 - static int tifm_device_remove(struct device *dev) 90 + static void tifm_device_remove(struct device *dev) 91 91 { 92 92 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); 93 93 struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, ··· 101 101 } 102 102 103 103 put_device(dev); 104 - return 0; 105 104 } 106 105 107 106 #ifdef CONFIG_PM
+1 -3
drivers/mmc/core/bus.c
··· 140 140 return drv->probe(card); 141 141 } 142 142 143 - static int mmc_bus_remove(struct device *dev) 143 + static void mmc_bus_remove(struct device *dev) 144 144 { 145 145 struct mmc_driver *drv = to_mmc_driver(dev->driver); 146 146 struct mmc_card *card = mmc_dev_to_card(dev); 147 147 148 148 drv->remove(card); 149 - 150 - return 0; 151 149 } 152 150 153 151 static void mmc_bus_shutdown(struct device *dev)
+1 -3
drivers/mmc/core/sdio_bus.c
··· 203 203 return ret; 204 204 } 205 205 206 - static int sdio_bus_remove(struct device *dev) 206 + static void sdio_bus_remove(struct device *dev) 207 207 { 208 208 struct sdio_driver *drv = to_sdio_driver(dev->driver); 209 209 struct sdio_func *func = dev_to_sdio_func(dev); ··· 232 232 pm_runtime_put_sync(dev); 233 233 234 234 dev_pm_domain_detach(dev, false); 235 - 236 - return 0; 237 235 } 238 236 239 237 static const struct dev_pm_ops sdio_bus_pm_ops = {
+1 -2
drivers/net/netdevsim/bus.c
··· 370 370 return nsim_dev_probe(nsim_bus_dev); 371 371 } 372 372 373 - static int nsim_bus_remove(struct device *dev) 373 + static void nsim_bus_remove(struct device *dev) 374 374 { 375 375 struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev); 376 376 377 377 nsim_dev_remove(nsim_bus_dev); 378 - return 0; 379 378 } 380 379 381 380 static int nsim_num_vf(struct device *dev)
+1 -3
drivers/ntb/core.c
··· 271 271 return rc; 272 272 } 273 273 274 - static int ntb_remove(struct device *dev) 274 + static void ntb_remove(struct device *dev) 275 275 { 276 276 struct ntb_dev *ntb; 277 277 struct ntb_client *client; ··· 283 283 client->ops.remove(client, ntb); 284 284 put_device(dev); 285 285 } 286 - 287 - return 0; 288 286 } 289 287 290 288 static void ntb_dev_release(struct device *dev)
+1 -3
drivers/ntb/ntb_transport.c
··· 304 304 return rc; 305 305 } 306 306 307 - static int ntb_transport_bus_remove(struct device *dev) 307 + static void ntb_transport_bus_remove(struct device *dev) 308 308 { 309 309 const struct ntb_transport_client *client; 310 310 ··· 312 312 client->remove(dev); 313 313 314 314 put_device(dev); 315 - 316 - return 0; 317 315 } 318 316 319 317 static struct bus_type ntb_transport_bus = {
+2 -4
drivers/nubus/bus.c
··· 29 29 return err; 30 30 } 31 31 32 - static int nubus_device_remove(struct device *dev) 32 + static void nubus_device_remove(struct device *dev) 33 33 { 34 34 struct nubus_driver *ndrv = to_nubus_driver(dev->driver); 35 - int err = -ENODEV; 36 35 37 36 if (dev->driver && ndrv->remove) 38 - err = ndrv->remove(to_nubus_board(dev)); 39 - return err; 37 + ndrv->remove(to_nubus_board(dev)); 40 38 } 41 39 42 40 struct bus_type nubus_bus_type = {
+1 -2
drivers/nvdimm/bus.c
··· 108 108 return rc; 109 109 } 110 110 111 - static int nvdimm_bus_remove(struct device *dev) 111 + static void nvdimm_bus_remove(struct device *dev) 112 112 { 113 113 struct nd_device_driver *nd_drv = to_nd_device_driver(dev->driver); 114 114 struct module *provider = to_bus_provider(dev); ··· 123 123 dev_dbg(&nvdimm_bus->dev, "%s.remove(%s)\n", dev->driver->name, 124 124 dev_name(dev)); 125 125 module_put(provider); 126 - return 0; 127 126 } 128 127 129 128 static void nvdimm_bus_shutdown(struct device *dev)
+1 -3
drivers/pci/endpoint/pci-epf-core.c
··· 387 387 return driver->probe(epf); 388 388 } 389 389 390 - static int pci_epf_device_remove(struct device *dev) 390 + static void pci_epf_device_remove(struct device *dev) 391 391 { 392 392 struct pci_epf *epf = to_pci_epf(dev); 393 393 struct pci_epf_driver *driver = to_pci_epf_driver(dev->driver); ··· 395 395 if (driver->remove) 396 396 driver->remove(epf); 397 397 epf->driver = NULL; 398 - 399 - return 0; 400 398 } 401 399 402 400 static struct bus_type pci_epf_bus_type = {
+1 -2
drivers/pci/pci-driver.c
··· 440 440 return error; 441 441 } 442 442 443 - static int pci_device_remove(struct device *dev) 443 + static void pci_device_remove(struct device *dev) 444 444 { 445 445 struct pci_dev *pci_dev = to_pci_dev(dev); 446 446 struct pci_driver *drv = pci_dev->driver; ··· 476 476 */ 477 477 478 478 pci_dev_put(pci_dev); 479 - return 0; 480 479 } 481 480 482 481 static void pci_device_shutdown(struct device *dev)
+1 -3
drivers/pcmcia/ds.c
··· 350 350 return; 351 351 } 352 352 353 - static int pcmcia_device_remove(struct device *dev) 353 + static void pcmcia_device_remove(struct device *dev) 354 354 { 355 355 struct pcmcia_device *p_dev; 356 356 struct pcmcia_driver *p_drv; ··· 389 389 /* references from pcmcia_device_probe */ 390 390 pcmcia_put_dev(p_dev); 391 391 module_put(p_drv->owner); 392 - 393 - return 0; 394 392 } 395 393 396 394
+1 -3
drivers/platform/surface/aggregator/bus.c
··· 316 316 ->probe(to_ssam_device(dev)); 317 317 } 318 318 319 - static int ssam_bus_remove(struct device *dev) 319 + static void ssam_bus_remove(struct device *dev) 320 320 { 321 321 struct ssam_device_driver *sdrv = to_ssam_device_driver(dev->driver); 322 322 323 323 if (sdrv->remove) 324 324 sdrv->remove(to_ssam_device(dev)); 325 - 326 - return 0; 327 325 } 328 326 329 327 struct bus_type ssam_bus_type = {
+1 -3
drivers/platform/x86/wmi.c
··· 980 980 return ret; 981 981 } 982 982 983 - static int wmi_dev_remove(struct device *dev) 983 + static void wmi_dev_remove(struct device *dev) 984 984 { 985 985 struct wmi_block *wblock = dev_to_wblock(dev); 986 986 struct wmi_driver *wdriver = ··· 997 997 998 998 if (ACPI_FAILURE(wmi_method_enable(wblock, 0))) 999 999 dev_warn(dev, "failed to disable device\n"); 1000 - 1001 - return 0; 1002 1000 } 1003 1001 1004 1002 static struct class wmi_bus_class = {
+1 -2
drivers/pnp/driver.c
··· 123 123 return error; 124 124 } 125 125 126 - static int pnp_device_remove(struct device *dev) 126 + static void pnp_device_remove(struct device *dev) 127 127 { 128 128 struct pnp_dev *pnp_dev = to_pnp_dev(dev); 129 129 struct pnp_driver *drv = pnp_dev->driver; ··· 139 139 pnp_disable_dev(pnp_dev); 140 140 141 141 pnp_device_detach(pnp_dev); 142 - return 0; 143 142 } 144 143 145 144 static void pnp_device_shutdown(struct device *dev)
+1 -3
drivers/rapidio/rio-driver.c
··· 112 112 * driver, then run the driver remove() method. Then update 113 113 * the reference count. 114 114 */ 115 - static int rio_device_remove(struct device *dev) 115 + static void rio_device_remove(struct device *dev) 116 116 { 117 117 struct rio_dev *rdev = to_rio_dev(dev); 118 118 struct rio_driver *rdrv = rdev->driver; ··· 124 124 } 125 125 126 126 rio_dev_put(rdev); 127 - 128 - return 0; 129 127 } 130 128 131 129 static void rio_device_shutdown(struct device *dev)
+2 -5
drivers/rpmsg/rpmsg_core.c
··· 530 530 return err; 531 531 } 532 532 533 - static int rpmsg_dev_remove(struct device *dev) 533 + static void rpmsg_dev_remove(struct device *dev) 534 534 { 535 535 struct rpmsg_device *rpdev = to_rpmsg_device(dev); 536 536 struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver); 537 - int err = 0; 538 537 539 538 if (rpdev->ops->announce_destroy) 540 - err = rpdev->ops->announce_destroy(rpdev); 539 + rpdev->ops->announce_destroy(rpdev); 541 540 542 541 if (rpdrv->remove) 543 542 rpdrv->remove(rpdev); ··· 545 546 546 547 if (rpdev->ept) 547 548 rpmsg_destroy_ept(rpdev->ept); 548 - 549 - return err; 550 549 } 551 550 552 551 static struct bus_type rpmsg_bus = {
+1 -3
drivers/s390/cio/ccwgroup.c
··· 439 439 440 440 /************************** driver stuff ******************************/ 441 441 442 - static int ccwgroup_remove(struct device *dev) 442 + static void ccwgroup_remove(struct device *dev) 443 443 { 444 444 struct ccwgroup_device *gdev = to_ccwgroupdev(dev); 445 445 struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver); 446 446 447 447 if (gdrv->remove) 448 448 gdrv->remove(gdev); 449 - 450 - return 0; 451 449 } 452 450 453 451 static void ccwgroup_shutdown(struct device *dev)
+1 -3
drivers/s390/cio/css.c
··· 1371 1371 return ret; 1372 1372 } 1373 1373 1374 - static int css_remove(struct device *dev) 1374 + static void css_remove(struct device *dev) 1375 1375 { 1376 1376 struct subchannel *sch; 1377 1377 ··· 1379 1379 if (sch->driver->remove) 1380 1380 sch->driver->remove(sch); 1381 1381 sch->driver = NULL; 1382 - 1383 - return 0; 1384 1382 } 1385 1383 1386 1384 static void css_shutdown(struct device *dev)
+1 -3
drivers/s390/cio/device.c
··· 1741 1741 return 0; 1742 1742 } 1743 1743 1744 - static int ccw_device_remove(struct device *dev) 1744 + static void ccw_device_remove(struct device *dev) 1745 1745 { 1746 1746 struct ccw_device *cdev = to_ccwdev(dev); 1747 1747 struct ccw_driver *cdrv = cdev->drv; ··· 1775 1775 spin_unlock_irq(cdev->ccwlock); 1776 1776 io_subchannel_quiesce(sch); 1777 1777 __disable_cmf(cdev); 1778 - 1779 - return 0; 1780 1778 } 1781 1779 1782 1780 static void ccw_device_shutdown(struct device *dev)
+1 -3
drivers/s390/cio/scm.c
··· 28 28 return scmdrv->probe ? scmdrv->probe(scmdev) : -ENODEV; 29 29 } 30 30 31 - static int scmdev_remove(struct device *dev) 31 + static void scmdev_remove(struct device *dev) 32 32 { 33 33 struct scm_device *scmdev = to_scm_dev(dev); 34 34 struct scm_driver *scmdrv = to_scm_drv(dev->driver); 35 35 36 36 if (scmdrv->remove) 37 37 scmdrv->remove(scmdev); 38 - 39 - return 0; 40 38 } 41 39 42 40 static int scmdev_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/s390/crypto/ap_bus.c
··· 901 901 return rc; 902 902 } 903 903 904 - static int ap_device_remove(struct device *dev) 904 + static void ap_device_remove(struct device *dev) 905 905 { 906 906 struct ap_device *ap_dev = to_ap_dev(dev); 907 907 struct ap_driver *ap_drv = ap_dev->drv; ··· 926 926 ap_dev->drv = NULL; 927 927 928 928 put_device(dev); 929 - 930 - return 0; 931 929 } 932 930 933 931 struct ap_queue *ap_get_qdev(ap_qid_t qid)
+1 -2
drivers/scsi/scsi_debug.c
··· 7674 7674 return error; 7675 7675 } 7676 7676 7677 - static int sdebug_driver_remove(struct device *dev) 7677 + static void sdebug_driver_remove(struct device *dev) 7678 7678 { 7679 7679 struct sdebug_host_info *sdbg_host; 7680 7680 struct sdebug_dev_info *sdbg_devinfo, *tmp; ··· 7691 7691 } 7692 7692 7693 7693 scsi_host_put(sdbg_host->shost); 7694 - return 0; 7695 7694 } 7696 7695 7697 7696 static int pseudo_lld_bus_match(struct device *dev,
+2 -6
drivers/sh/superhyway/superhyway.c
··· 150 150 return -ENODEV; 151 151 } 152 152 153 - static int superhyway_device_remove(struct device *dev) 153 + static void superhyway_device_remove(struct device *dev) 154 154 { 155 155 struct superhyway_device *shyway_dev = to_superhyway_device(dev); 156 156 struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver); 157 157 158 - if (shyway_drv && shyway_drv->remove) { 158 + if (shyway_drv && shyway_drv->remove) 159 159 shyway_drv->remove(shyway_dev); 160 - return 0; 161 - } 162 - 163 - return -ENODEV; 164 160 } 165 161 166 162 /**
+1 -3
drivers/siox/siox-core.c
··· 520 520 return sdriver->probe(sdevice); 521 521 } 522 522 523 - static int siox_remove(struct device *dev) 523 + static void siox_remove(struct device *dev) 524 524 { 525 525 struct siox_driver *sdriver = 526 526 container_of(dev->driver, struct siox_driver, driver); ··· 528 528 529 529 if (sdriver->remove) 530 530 sdriver->remove(sdevice); 531 - 532 - return 0; 533 531 } 534 532 535 533 static void siox_shutdown(struct device *dev)
+1 -3
drivers/slimbus/core.c
··· 81 81 return ret; 82 82 } 83 83 84 - static int slim_device_remove(struct device *dev) 84 + static void slim_device_remove(struct device *dev) 85 85 { 86 86 struct slim_device *sbdev = to_slim_device(dev); 87 87 struct slim_driver *sbdrv; ··· 91 91 if (sbdrv->remove) 92 92 sbdrv->remove(sbdev); 93 93 } 94 - 95 - return 0; 96 94 } 97 95 98 96 static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/soc/qcom/apr.c
··· 217 217 return adrv->probe(adev); 218 218 } 219 219 220 - static int apr_device_remove(struct device *dev) 220 + static void apr_device_remove(struct device *dev) 221 221 { 222 222 struct apr_device *adev = to_apr_device(dev); 223 223 struct apr_driver *adrv; ··· 231 231 idr_remove(&apr->svcs_idr, adev->svc_id); 232 232 spin_unlock(&apr->svcs_lock); 233 233 } 234 - 235 - return 0; 236 234 } 237 235 238 236 static int apr_uevent(struct device *dev, struct kobj_uevent_env *env)
+1 -3
drivers/spi/spi.c
··· 405 405 return ret; 406 406 } 407 407 408 - static int spi_remove(struct device *dev) 408 + static void spi_remove(struct device *dev) 409 409 { 410 410 const struct spi_driver *sdrv = to_spi_driver(dev->driver); 411 411 ··· 420 420 } 421 421 422 422 dev_pm_domain_detach(dev, true); 423 - 424 - return 0; 425 423 } 426 424 427 425 static void spi_shutdown(struct device *dev)
+1 -2
drivers/spmi/spmi.c
··· 345 345 return err; 346 346 } 347 347 348 - static int spmi_drv_remove(struct device *dev) 348 + static void spmi_drv_remove(struct device *dev) 349 349 { 350 350 const struct spmi_driver *sdrv = to_spmi_driver(dev->driver); 351 351 ··· 356 356 pm_runtime_disable(dev); 357 357 pm_runtime_set_suspended(dev); 358 358 pm_runtime_put_noidle(dev); 359 - return 0; 360 359 } 361 360 362 361 static void spmi_drv_shutdown(struct device *dev)
+1 -3
drivers/ssb/main.c
··· 283 283 ssb_drv->shutdown(ssb_dev); 284 284 } 285 285 286 - static int ssb_device_remove(struct device *dev) 286 + static void ssb_device_remove(struct device *dev) 287 287 { 288 288 struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); 289 289 struct ssb_driver *ssb_drv = drv_to_ssb_drv(dev->driver); ··· 291 291 if (ssb_drv && ssb_drv->remove) 292 292 ssb_drv->remove(ssb_dev); 293 293 ssb_device_put(ssb_dev); 294 - 295 - return 0; 296 294 } 297 295 298 296 static int ssb_device_probe(struct device *dev)
+1 -3
drivers/staging/fieldbus/anybuss/host.c
··· 1186 1186 return adrv->probe(adev); 1187 1187 } 1188 1188 1189 - static int anybus_bus_remove(struct device *dev) 1189 + static void anybus_bus_remove(struct device *dev) 1190 1190 { 1191 1191 struct anybuss_client_driver *adrv = 1192 1192 to_anybuss_client_driver(dev->driver); 1193 1193 1194 1194 if (adrv->remove) 1195 1195 adrv->remove(to_anybuss_client(dev)); 1196 - 1197 - return 0; 1198 1196 } 1199 1197 1200 1198 static struct bus_type anybus_bus = {
+1 -3
drivers/staging/greybus/gbphy.c
··· 169 169 return ret; 170 170 } 171 171 172 - static int gbphy_dev_remove(struct device *dev) 172 + static void gbphy_dev_remove(struct device *dev) 173 173 { 174 174 struct gbphy_driver *gbphy_drv = to_gbphy_driver(dev->driver); 175 175 struct gbphy_device *gbphy_dev = to_gbphy_dev(dev); ··· 180 180 pm_runtime_set_suspended(dev); 181 181 pm_runtime_put_noidle(dev); 182 182 pm_runtime_dont_use_autosuspend(dev); 183 - 184 - return 0; 185 183 } 186 184 187 185 static struct bus_type gbphy_bus_type = {
+2 -3
drivers/target/loopback/tcm_loop.c
··· 81 81 } 82 82 83 83 static int tcm_loop_driver_probe(struct device *); 84 - static int tcm_loop_driver_remove(struct device *); 84 + static void tcm_loop_driver_remove(struct device *); 85 85 86 86 static int pseudo_lld_bus_match(struct device *dev, 87 87 struct device_driver *dev_driver) ··· 363 363 return 0; 364 364 } 365 365 366 - static int tcm_loop_driver_remove(struct device *dev) 366 + static void tcm_loop_driver_remove(struct device *dev) 367 367 { 368 368 struct tcm_loop_hba *tl_hba; 369 369 struct Scsi_Host *sh; ··· 373 373 374 374 scsi_remove_host(sh); 375 375 scsi_host_put(sh); 376 - return 0; 377 376 } 378 377 379 378 static void tcm_loop_release_adapter(struct device *dev)
+1 -3
drivers/thunderbolt/domain.c
··· 86 86 return driver->probe(svc, id); 87 87 } 88 88 89 - static int tb_service_remove(struct device *dev) 89 + static void tb_service_remove(struct device *dev) 90 90 { 91 91 struct tb_service *svc = tb_to_service(dev); 92 92 struct tb_service_driver *driver; ··· 94 94 driver = container_of(dev->driver, struct tb_service_driver, driver); 95 95 if (driver->remove) 96 96 driver->remove(svc); 97 - 98 - return 0; 99 97 } 100 98 101 99 static void tb_service_shutdown(struct device *dev)
+1 -3
drivers/tty/serdev/core.c
··· 421 421 return ret; 422 422 } 423 423 424 - static int serdev_drv_remove(struct device *dev) 424 + static void serdev_drv_remove(struct device *dev) 425 425 { 426 426 const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver); 427 427 if (sdrv->remove) 428 428 sdrv->remove(to_serdev_device(dev)); 429 429 430 430 dev_pm_domain_detach(dev, true); 431 - 432 - return 0; 433 431 } 434 432 435 433 static struct bus_type serdev_bus_type = {
+1 -3
drivers/usb/common/ulpi.c
··· 78 78 return drv->probe(to_ulpi_dev(dev)); 79 79 } 80 80 81 - static int ulpi_remove(struct device *dev) 81 + static void ulpi_remove(struct device *dev) 82 82 { 83 83 struct ulpi_driver *drv = to_ulpi_driver(dev->driver); 84 84 85 85 if (drv->remove) 86 86 drv->remove(to_ulpi_dev(dev)); 87 - 88 - return 0; 89 87 } 90 88 91 89 static struct bus_type ulpi_bus = {
+1 -3
drivers/usb/serial/bus.c
··· 74 74 return retval; 75 75 } 76 76 77 - static int usb_serial_device_remove(struct device *dev) 77 + static void usb_serial_device_remove(struct device *dev) 78 78 { 79 79 struct usb_serial_port *port = to_usb_serial_port(dev); 80 80 struct usb_serial_driver *driver; ··· 101 101 102 102 if (!autopm_err) 103 103 usb_autopm_put_interface(port->serial->interface); 104 - 105 - return 0; 106 104 } 107 105 108 106 static ssize_t new_id_store(struct device_driver *driver,
+1 -3
drivers/usb/typec/bus.c
··· 382 382 return ret; 383 383 } 384 384 385 - static int typec_remove(struct device *dev) 385 + static void typec_remove(struct device *dev) 386 386 { 387 387 struct typec_altmode_driver *drv = to_altmode_driver(dev->driver); 388 388 struct typec_altmode *adev = to_typec_altmode(dev); ··· 400 400 401 401 adev->desc = NULL; 402 402 adev->ops = NULL; 403 - 404 - return 0; 405 403 } 406 404 407 405 struct bus_type typec_bus = {
+1 -3
drivers/vdpa/vdpa.c
··· 34 34 return ret; 35 35 } 36 36 37 - static int vdpa_dev_remove(struct device *d) 37 + static void vdpa_dev_remove(struct device *d) 38 38 { 39 39 struct vdpa_device *vdev = dev_to_vdpa(d); 40 40 struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); 41 41 42 42 if (drv && drv->remove) 43 43 drv->remove(vdev); 44 - 45 - return 0; 46 44 } 47 45 48 46 static struct bus_type vdpa_bus = {
+1 -3
drivers/vfio/mdev/mdev_driver.c
··· 57 57 return ret; 58 58 } 59 59 60 - static int mdev_remove(struct device *dev) 60 + static void mdev_remove(struct device *dev) 61 61 { 62 62 struct mdev_driver *drv = 63 63 container_of(dev->driver, struct mdev_driver, driver); ··· 67 67 drv->remove(mdev); 68 68 69 69 mdev_detach_iommu(mdev); 70 - 71 - return 0; 72 70 } 73 71 74 72 static int mdev_match(struct device *dev, struct device_driver *drv)
+1 -2
drivers/virtio/virtio.c
··· 278 278 279 279 } 280 280 281 - static int virtio_dev_remove(struct device *_d) 281 + static void virtio_dev_remove(struct device *_d) 282 282 { 283 283 struct virtio_device *dev = dev_to_virtio(_d); 284 284 struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); ··· 292 292 293 293 /* Acknowledge the device's existence again. */ 294 294 virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); 295 - return 0; 296 295 } 297 296 298 297 static struct bus_type virtio_bus = {
+1 -3
drivers/vlynq/vlynq.c
··· 342 342 return result; 343 343 } 344 344 345 - static int vlynq_device_remove(struct device *dev) 345 + static void vlynq_device_remove(struct device *dev) 346 346 { 347 347 struct vlynq_driver *drv = to_vlynq_driver(dev->driver); 348 348 349 349 if (drv->remove) 350 350 drv->remove(to_vlynq_device(dev)); 351 - 352 - return 0; 353 351 } 354 352 355 353 int __vlynq_register_driver(struct vlynq_driver *driver, struct module *owner)
+1 -3
drivers/vme/vme.c
··· 1990 1990 return -ENODEV; 1991 1991 } 1992 1992 1993 - static int vme_bus_remove(struct device *dev) 1993 + static void vme_bus_remove(struct device *dev) 1994 1994 { 1995 1995 struct vme_driver *driver; 1996 1996 struct vme_dev *vdev = dev_to_vme_dev(dev); ··· 1998 1998 driver = dev->platform_data; 1999 1999 if (driver->remove) 2000 2000 driver->remove(vdev); 2001 - 2002 - return 0; 2003 2001 } 2004 2002 2005 2003 struct bus_type vme_bus_type = {
+1 -1
drivers/xen/xenbus/xenbus.h
··· 106 106 107 107 int xenbus_match(struct device *_dev, struct device_driver *_drv); 108 108 int xenbus_dev_probe(struct device *_dev); 109 - int xenbus_dev_remove(struct device *_dev); 109 + void xenbus_dev_remove(struct device *_dev); 110 110 int xenbus_register_driver_common(struct xenbus_driver *drv, 111 111 struct xen_bus_type *bus, 112 112 struct module *owner,
+1 -3
drivers/xen/xenbus/xenbus_probe.c
··· 325 325 } 326 326 EXPORT_SYMBOL_GPL(xenbus_dev_probe); 327 327 328 - int xenbus_dev_remove(struct device *_dev) 328 + void xenbus_dev_remove(struct device *_dev) 329 329 { 330 330 struct xenbus_device *dev = to_xenbus_device(_dev); 331 331 struct xenbus_driver *drv = to_xenbus_driver(_dev->driver); ··· 355 355 if (!drv->allow_rebind || 356 356 xenbus_read_driver_state(dev->nodename) == XenbusStateClosing) 357 357 xenbus_switch_state(dev, XenbusStateClosed); 358 - 359 - return 0; 360 358 } 361 359 EXPORT_SYMBOL_GPL(xenbus_dev_remove); 362 360
+1 -2
drivers/zorro/zorro-driver.c
··· 62 62 } 63 63 64 64 65 - static int zorro_device_remove(struct device *dev) 65 + static void zorro_device_remove(struct device *dev) 66 66 { 67 67 struct zorro_dev *z = to_zorro_dev(dev); 68 68 struct zorro_driver *drv = to_zorro_driver(dev->driver); ··· 72 72 drv->remove(z); 73 73 z->driver = NULL; 74 74 } 75 - return 0; 76 75 } 77 76 78 77
+1 -1
include/linux/device/bus.h
··· 91 91 int (*uevent)(struct device *dev, struct kobj_uevent_env *env); 92 92 int (*probe)(struct device *dev); 93 93 void (*sync_state)(struct device *dev); 94 - int (*remove)(struct device *dev); 94 + void (*remove)(struct device *dev); 95 95 void (*shutdown)(struct device *dev); 96 96 97 97 int (*online)(struct device *dev);
+2 -4
sound/ac97/bus.c
··· 514 514 return ret; 515 515 } 516 516 517 - static int ac97_bus_remove(struct device *dev) 517 + static void ac97_bus_remove(struct device *dev) 518 518 { 519 519 struct ac97_codec_device *adev = to_ac97_device(dev); 520 520 struct ac97_codec_driver *adrv = to_ac97_driver(dev->driver); ··· 522 522 523 523 ret = pm_runtime_resume_and_get(dev); 524 524 if (ret < 0) 525 - return ret; 525 + return; 526 526 527 527 ret = adrv->remove(adev); 528 528 pm_runtime_put_noidle(dev); ··· 530 530 ac97_put_disable_clk(adev); 531 531 532 532 pm_runtime_disable(dev); 533 - 534 - return ret; 535 533 } 536 534 537 535 static struct bus_type ac97_bus_type = {
+1 -3
sound/aoa/soundbus/core.c
··· 104 104 return retval; 105 105 } 106 106 107 - static int soundbus_device_remove(struct device *dev) 107 + static void soundbus_device_remove(struct device *dev) 108 108 { 109 109 struct soundbus_dev * soundbus_dev = to_soundbus_device(dev); 110 110 struct soundbus_driver * drv = to_soundbus_driver(dev->driver); ··· 112 112 if (dev->driver && drv->remove) 113 113 drv->remove(soundbus_dev); 114 114 soundbus_dev_put(soundbus_dev); 115 - 116 - return 0; 117 115 } 118 116 119 117 static void soundbus_device_shutdown(struct device *dev)