lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ARM: OMAP2+: Return correct error values from device and hwmod
Date
On Friday 20 February 2015 09:22:26 Pavel Machek wrote:
> On Fri 2015-02-20 00:41:41, Pali Rohár wrote:
> > Without this patch function pm_runtime_get_sync() returns 0
> > even when some omap subfunction fails. This patch properly
> > propagate error codes from omap functions back to caller.
> >
> > This patch fix problem, when loading omap-aes driver in qemu
> > cause kernel oops.
>
> "fixes"
>
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
>
> Acked-by: Pavel Machek <pavel@ucw.cz>
>
> > @@ -3350,16 +3350,17 @@ int omap_hwmod_enable(struct
> > omap_hwmod *oh)
> >
> > */
> >
> > int omap_hwmod_idle(struct omap_hwmod *oh)
> > {
> >
> > + int r;
> >
> > unsigned long flags;
> >
> > if (!oh)
> >
> > return -EINVAL;
> >
> > spin_lock_irqsave(&oh->_lock, flags);
> >
> > - _idle(oh);
> > + r = _idle(oh);
> >
> > spin_unlock_irqrestore(&oh->_lock, flags);
> >
> > - return 0;
> > + return r;
> >
> > }
>
> Normally, such variable is called ret or res...
>
> Pavel

In other parts of this code is used name "r" not "ret".

--
Pali Rohár
pali.rohar@gmail.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-02-20 11:01    [W:0.085 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site