diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2021-02-06 16:13:48 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-03-08 17:16:03 +0100 |
commit | e71da1fd0e84bc5c87a78b405e40713840eecc80 (patch) | |
tree | a2fe6e0fde7924f1f3b8e365870b893a94728b9e /drivers/hid/intel-ish-hid/ishtp | |
parent | HID: intel-ish-hid: Simplify logic in ishtp_cl_device_remove() (diff) | |
download | linux-e71da1fd0e84bc5c87a78b405e40713840eecc80.tar.xz linux-e71da1fd0e84bc5c87a78b405e40713840eecc80.zip |
HID: intel-ish-hid: Make remove callback return void
The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct ishtp_cl_driver::remove() return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error value is a bad idea.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ishtp')
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp/bus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index 7f36ce6187a1..ffc9ce5c86ee 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -258,7 +258,6 @@ static int ishtp_cl_device_remove(struct device *dev) { struct ishtp_cl_device *device = to_ishtp_cl_device(dev); struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); - int ret = 0; if (device->event_cb) { device->event_cb = NULL; @@ -266,9 +265,9 @@ static int ishtp_cl_device_remove(struct device *dev) } if (driver->remove) - ret = driver->remove(device); + driver->remove(device); - return ret; + return 0; } /** |