Skip to content

Commit

Permalink
platform/x86: peaq-wmi: Remove unnecessary checks from peaq_wmi_exit
Browse files Browse the repository at this point in the history
peaq_wmi_exit will only ever get called if peaq_wmi_init succeeds, so
there is no need to repeat the checks from peaq_wmi_init.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Hans de Goede authored and Andy Shevchenko committed Nov 3, 2017
1 parent d6fa71f commit f6c7b80
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/platform/x86/peaq-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void peaq_wmi_poll(struct input_polled_dev *dev)
}

/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */
static const struct dmi_system_id peaq_dmi_table[] = {
static const struct dmi_system_id peaq_dmi_table[] __initconst = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "PEAQ"),
Expand Down Expand Up @@ -102,12 +102,6 @@ static int __init peaq_wmi_init(void)

static void __exit peaq_wmi_exit(void)
{
if (!dmi_check_system(peaq_dmi_table))
return;

if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID))
return;

input_unregister_polled_device(peaq_poll_dev);
}

Expand Down

0 comments on commit f6c7b80

Please sign in to comment.