Skip to content

Commit 608446c

Browse files
Dan CarpenterJiri Kosina
authored andcommitted
HID: lenovo: silence unreachable code warning
In theory, this code used to return 0 if CONFIG_ACPI_PLATFORM_PROFILE was disabled. It's not clear if that was a config which would actually boot so we've removed the CONFIG_ACPI_PLATFORM_PROFILE ifdef. But now the "return 0;" statement is unreachable and static checker tools complain. Delete it and pull the else statement in a tab to silence the checker warning and make the code a bit more clear. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent d6ea85f commit 608446c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/hid/hid-lenovo.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,9 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
728728
if (hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) {
729729
report_key_event(input, KEY_RFKILL);
730730
return 1;
731-
} else {
732-
platform_profile_cycle();
733-
return 1;
734731
}
735-
return 0;
732+
platform_profile_cycle();
733+
return 1;
736734
case TP_X12_RAW_HOTKEY_FN_F10:
737735
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/
738736
(hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) ?

0 commit comments

Comments
 (0)