From: Kevin Hilman <khilman@ti.com>
To: Shubhrajyoti D <shubhrajyoti@ti.com>
Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org, balbi@ti.com
Subject: Re: [PATCH RFC v2] usb: musb: omap: fix the error check for pm_runtime_get_sync
Date: Thu, 22 Mar 2012 10:36:19 -0700 [thread overview]
Message-ID: <87k42ca67g.fsf@ti.com> (raw)
In-Reply-To: <1332422925-3212-1-git-send-email-shubhrajyoti@ti.com> (Shubhrajyoti D.'s message of "Thu, 22 Mar 2012 18:58:45 +0530")
Shubhrajyoti D <shubhrajyoti@ti.com> writes:
> 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>
> ---
> Compile tested only
>
> 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
> @@ -282,7 +282,8 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
>
> static int omap2430_musb_init(struct musb *musb)
> {
> - u32 l, status = 0;
> + u32 l;
> + int status = 0;
nit: you might as well drop the '= 0' assignment since it's not needed.
Otherwise, looks right to me.
Acked-by: Kevin Hilman <khilman@ti.com>
Kevin
> struct device *dev = musb->controller;
> struct musb_hdrc_platform_data *plat = dev->platform_data;
> struct omap_musb_board_data *data = plat->board_data;
> @@ -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);
> goto err1;
> }
prev parent reply other threads:[~2012-03-22 17:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 13:28 [PATCH RFC v2] usb: musb: omap: fix the error check for pm_runtime_get_sync Shubhrajyoti D
2012-03-22 17:36 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k42ca67g.fsf@ti.com \
--to=khilman@ti.com \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shubhrajyoti@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.