usb: musb: omap: fix the error check for pm_runtime_get_sync
authorShubhrajyoti D <shubhrajyoti@ti.com>
Thu, 22 Mar 2012 07:18:06 +0000 (12:48 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:06 +0000 (13:14 +0100)
commit2e67ffa6107563e7c147d3648d7b457c0ac571d8
treee926319ea1efcaa599a624c13c0eadab0daf3671
parentf48a6c0a5a021f575ca37d923b4149317bcb4c63
usb: musb: omap: fix the error check for pm_runtime_get_sync

commit ad579699c4f0274bf522a9252ff9b20c72197e48 upstream.

pm_runtime_get_sync returns a signed integer. In case of errors
it returns a negative value. This patch fixes the error check
by making it signed instead of unsigned thus preventing register
access if get_sync_fails. Also passes the error cause to the
debug message.

Cc: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/musb/omap2430.c