Re: [PATCH RFC] usb: musb: omap: fix the error check for pm_runtime_get_sync

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

 



On Thu, Mar 22, 2012 at 04:42:21PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 22-03-2012 11:18, Shubhrajyoti D wrote:
> 
> >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@xxxxxx>
> >Signed-off-by: Shubhrajyoti D<shubhrajyoti@xxxxxx>
> >---
> >Compile tested only
> 
>    You haven't run it thru scripts/checkpatch.pl either, I guess?
> 
> >  drivers/usb/musb/omap2430.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> >diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> >index 2ae0bb3..e5dd18f 100644
> >--- a/drivers/usb/musb/omap2430.c
> >+++ b/drivers/usb/musb/omap2430.c
> [...]
> >@@ -301,7 +302,7 @@ static int omap2430_musb_init(struct musb *musb)
> >
> >  	status = pm_runtime_get_sync(dev);
> >  	if (status<  0) {
> >-		dev_err(dev, "pm_runtime_get_sync FAILED");
> >+		dev_err(dev, "pm_runtime_get_sync FAILED %d \n",status);
> 
>    If I don't mistake, scripts/checkpatch.pl should warn about
> unneeded spaces before '\n'. And also about missing spaces after
> commas.

I fixed in my branch, thanks

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux