OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 16:51:08 +0000 (09:51 -0700)
commit04b09f662db41a24c9e3e5d40340ad1c17dce347
treed2c23442f9698ea81c4cd82ce1f090a8af427d6b
parent8a1f6b4eca816f6b186b125f72ef284ef7960b85
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/omap2430.c