Re: [PATCH RFC 1/3] usb: phy: fix the error check

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

 



Hi,

On Thu, Sep 13, 2012 at 7:44 PM, Shubhrajyoti D <shubhrajyoti@xxxxxx> wrote:
> The functions pm_runtime_get_sync and clk_enable
> return a signed value. So the variable used to
> store should be signed otherwise a negative value may be
> wrongly interpreted.
>
> While at it also remove the initialisation of ret to zero.
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>

FWIW:
Acked-by: Kishon Vijay Abraham I <kishon@xxxxxx>
> ---
> untested
>
>  drivers/usb/phy/omap-usb2.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
> index 15ab3d6..d36c282 100644
> --- a/drivers/usb/phy/omap-usb2.c
> +++ b/drivers/usb/phy/omap-usb2.c
> @@ -120,7 +120,7 @@ static int omap_usb_set_peripheral(struct usb_otg *otg,
>
>  static int omap_usb2_suspend(struct usb_phy *x, int suspend)
>  {
> -       u32 ret;
> +       int ret;
>         struct omap_usb *phy = phy_to_omapusb(x);
>
>         if (suspend && !phy->is_suspended) {
> @@ -223,7 +223,7 @@ static int omap_usb2_runtime_suspend(struct device *dev)
>
>  static int omap_usb2_runtime_resume(struct device *dev)
>  {
> -       u32 ret = 0;
> +       int ret;
>         struct platform_device  *pdev = to_platform_device(dev);
>         struct omap_usb *phy = platform_get_drvdata(pdev);
>
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux