[PATCH] Input: omap4-keypad: Fix the pm_runtime_get_sync return check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A non-zero on pm_runtime_get_sync shouldnt be considered as an error
it only means that there was another user. Fix the error check to check
for negative values only.

This should fix issues like below
[  917.049713] omap4-keypad omap4-keypad: pm_runtime_get_sync() failed
[  917.056457] omap4-keypad: probe of omap4-keypad failed with error 1

Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
---
 drivers/input/keyboard/omap4-keypad.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 17efede..34cddaf 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -305,8 +305,8 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
 	 */
 	pm_runtime_enable(&pdev->dev);
 	error = pm_runtime_get_sync(&pdev->dev);
-	if (error) {
-		dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n");
+	if (IS_ERR_VALUE(error)) {
+		dev_err(&pdev->dev, "pm_runtime_get_sync() failed %d\n", error);
 		goto err_unmap;
 	}
 	rev = __raw_readl(keypad_data->base + OMAP4_KBD_REVISION);
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux