Re: [PATCH] ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list

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

 



On Thu, 6 Oct 2011, Russell King - ARM Linux wrote:

> On Thu, Oct 06, 2011 at 02:39:28PM -0600, Paul Walmsley wrote:
> > @@ -3240,7 +3240,7 @@ int __init omap3xxx_hwmod_init(void)
> >  
> >  	/* Register hwmods common to all OMAP3 */
> >  	r = omap_hwmod_register(omap3xxx_hwmods);
> > -	if (!r)
> > +	if (IS_ERR_VALUE(r))
> >  		return r;
> >  
> >  	rev = omap_rev();
> > @@ -3265,7 +3265,7 @@ int __init omap3xxx_hwmod_init(void)
> >  	};
> >  
> >  	r = omap_hwmod_register(h);
> > -	if (!r)
> > +	if (IS_ERR_VALUE(r))
> >  		return r;
> 
> What _really_ is the return value meaning of omap_hwmod_register() ?
> 
> If it's zero for success, negative for error codes, then don't be
> clever and try to use IS_ERR_VALUE() for that - just use a standard
> < 0 test instead.
> 
> You only need to use IS_ERR_VALUE() for stuff that may return negative
> errno values _and_ which may return valid addresses which may be
> misinterpreted as negative numbers.

Thanks, that's a good point - fixed.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux