aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/cros_ec_ishtp.c
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2021-02-06 16:13:48 +0100
committerJiri Kosina <jkosina@suse.cz>2021-03-08 17:16:03 +0100
commite71da1fd0e84bc5c87a78b405e40713840eecc80 (patch)
treea2fe6e0fde7924f1f3b8e365870b893a94728b9e /drivers/platform/chrome/cros_ec_ishtp.c
parentHID: intel-ish-hid: Simplify logic in ishtp_cl_device_remove() (diff)
downloadlinux-dev-e71da1fd0e84bc5c87a78b405e40713840eecc80.tar.xz
linux-dev-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/platform/chrome/cros_ec_ishtp.c')
-rw-r--r--drivers/platform/chrome/cros_ec_ishtp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
index f00107017318..9d1e7e03628e 100644
--- a/drivers/platform/chrome/cros_ec_ishtp.c
+++ b/drivers/platform/chrome/cros_ec_ishtp.c
@@ -703,7 +703,7 @@ end_ishtp_cl_alloc_error:
*
* Return: 0
*/
-static int cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
+static void cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
{
struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
@@ -712,8 +712,6 @@ static int cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
cancel_work_sync(&client_data->work_ec_evt);
cros_ish_deinit(cros_ish_cl);
ishtp_put_device(cl_device);
-
- return 0;
}
/**