Input: omap4-keypad - fix pm_runtime_get_sync() error checking
authorMiaoqian Lin <linmq006@gmail.com>
Sun, 17 Apr 2022 20:03:31 +0000 (13:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:38:58 +0000 (14:38 +0200)
commitf0cfae3e0d3a95118b883d4ff577043d211f4f47
treed8eb07e125766c1fdf071cc15a9375e2f753cfc6
parent232541989a1abbcf8946f3be2200a854db5bd62b
Input: omap4-keypad - fix pm_runtime_get_sync() error checking

[ Upstream commit 81022a170462d38ea10612cb67e8e2c529d58abe ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/keyboard/omap4-keypad.c