Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: omap4-keypad - fix pm_runtime_get_sync() error checking

If the device is already in a runtime PM enabled state
pm_runtime_get_sync() will return 1, so a test for negative
value should be used to check for errors.

Fixes: f77621cc640a ("Input: omap-keypad - dynamically handle register offsets")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220412070131.19848-1-linmq006@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Miaoqian Lin and committed by
Dmitry Torokhov
81022a17 fd0a4b39

+1 -1
+1 -1
drivers/input/keyboard/omap4-keypad.c
··· 393 393 * revision register. 394 394 */ 395 395 error = pm_runtime_get_sync(dev); 396 - if (error) { 396 + if (error < 0) { 397 397 dev_err(dev, "pm_runtime_get_sync() failed\n"); 398 398 pm_runtime_put_noidle(dev); 399 399 return error;