Skip to content

Commit 81022a1

Browse files
Yuuoniydtor
authored andcommitted
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: f77621c ("Input: omap-keypad - dynamically handle register offsets") Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent fd0a4b3 commit 81022a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/omap4-keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
393393
* revision register.
394394
*/
395395
error = pm_runtime_get_sync(dev);
396-
if (error) {
396+
if (error < 0) {
397397
dev_err(dev, "pm_runtime_get_sync() failed\n");
398398
pm_runtime_put_noidle(dev);
399399
return error;

0 commit comments

Comments
 (0)