summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/wmi-bmof.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-03-01 19:04:04 +0300
committerHans de Goede <hdegoede@redhat.com>2021-03-08 13:33:39 +0300
commit2b329f5694aec86107931584413c7d2ebc6b548d (patch)
treebef3934baddef03a5a3775f7bd4aaf9915b36b6c /drivers/platform/x86/wmi-bmof.c
parent2478907572fdd7cf285720f16513e956b3528854 (diff)
downloadlinux-2b329f5694aec86107931584413c7d2ebc6b548d.tar.xz
platform/x86: wmi: Make remove callback return void
The driver core ignores the return value of struct bus_type::remove() (and so wmi_dev_remove()) because there is only little that can be done. To simplify the quest to make this function return void, let struct wmi_driver::remove() return void, too. All implementers of this callback return 0 already and this way it should be obvious to driver authors that returning an error code is a bad idea. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210301160404.1677064-1-u.kleine-koenig@pengutronix.de Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/wmi-bmof.c')
-rw-r--r--drivers/platform/x86/wmi-bmof.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c
index 66b434d6307f..80137afb9753 100644
--- a/drivers/platform/x86/wmi-bmof.c
+++ b/drivers/platform/x86/wmi-bmof.c
@@ -86,13 +86,12 @@ static int wmi_bmof_probe(struct wmi_device *wdev, const void *context)
return ret;
}
-static int wmi_bmof_remove(struct wmi_device *wdev)
+static void wmi_bmof_remove(struct wmi_device *wdev)
{
struct bmof_priv *priv = dev_get_drvdata(&wdev->dev);
sysfs_remove_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr);
kfree(priv->bmofdata);
- return 0;
}
static const struct wmi_device_id wmi_bmof_id_table[] = {