[PATCH] paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ERR_PTR(-ENOSYS) instead of NULL
Marc Kleine-Budde
mkl at pengutronix.de
Mon Mar 9 07:49:14 PDT 2015
On 03/09/2015 03:45 PM, Marc Kleine-Budde wrote:
> On 03/09/2015 03:45 PM, Marc Kleine-Budde wrote:
>> Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
>> ---
>> include/param.h | 18 +++++++++---------
>> 1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/param.h b/include/param.h
>> index 53bee541100e..bd2c0789968a 100644
>> --- a/include/param.h
>> +++ b/include/param.h
>> @@ -97,7 +97,7 @@ static inline struct param_d *dev_add_param(struct device_d *dev, char *name,
>> const char *(*get)(struct device_d *, struct param_d *p),
>> unsigned long flags)
>> {
>> - return 0;
>> + return ERR_PTR(-ENOSYS);
The function returned a plain integer 0 instead of a NULL pointer, so
this patch is correct.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20150309/675a3e79/attachment.sig>
More information about the barebox
mailing list