[PATCH 4/5] omap2plus: voltage: Trivial linking fix 'undefined reference'
Nishanth Menon
nm at ti.com
Tue Jan 4 13:52:54 EST 2011
Santosh Shilimkar had written, on 01/04/2011 12:50 PM, the following:
[..]
>>>> +static inline struct voltagedomain
>>> *omap_voltage_domain_lookup(char *name)
>>>> +{
>>>> + return NULL;
>>> the omap_voltage_domain_lookup uses ERR_PTR() for all return
>> values
>>> which are handled by the callers with IS_ERR()
>>>
>>> I think you should return ERR_PTR(-EINVAL)
>>>
>> The expected return value is pointer type and hence used
>> NULL.
>
> 'ERR_PTR(-EINVAL)' is also ok.
looking at the implementation (when CONFIG_PM is enabled),
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=blob;f=arch/arm/mach-omap2/voltage.c;h=ed6079c94c57bae30f599bbad5e25a38fc676fa8;hb=refs/heads/omap-for-linus#l1487
ERR_PTR(-EINVAL) looks more appropriate to me.
--
Regards,
Nishanth Menon
More information about the linux-arm-kernel
mailing list