[PATCH v2 2/2] hp-wmi: Fix detection for dock and tablet mode

2017-04-19 Thread Carlo Caione
From: Carlo Caione The current driver code is not checking for the error values returned by 'hp_wmi_dock_state()' and 'hp_wmi_tablet_state()' before passing the returned values down to 'input_report_switch()'. This error code is being translated to '1' in the input subsystem,

[PATCH v2 2/2] hp-wmi: Fix detection for dock and tablet mode

2017-04-19 Thread Carlo Caione
From: Carlo Caione The current driver code is not checking for the error values returned by 'hp_wmi_dock_state()' and 'hp_wmi_tablet_state()' before passing the returned values down to 'input_report_switch()'. This error code is being translated to '1' in the input subsystem, reporting the wrong