From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH] paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ERR_PTR(-ENOSYS) instead of NULL
Date: Mon, 09 Mar 2015 15:49:14 +0100 [thread overview]
Message-ID: <54FDB2EA.30104@pengutronix.de> (raw)
In-Reply-To: <54FDB21A.3040402@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1046 bytes --]
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@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 |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-03-09 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 14:45 Marc Kleine-Budde
2015-03-09 14:45 ` Marc Kleine-Budde
2015-03-09 14:49 ` Marc Kleine-Budde [this message]
2015-03-10 10:09 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54FDB2EA.30104@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox