From: Rodolfo Giometti <giometti@enneenne.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
linux-kernel@vger.kernel.org,
Rodolfo Giometti <giometti@linux.it>
Cc: kernel-janitors@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] c2port: checking for NULL instead of IS_ERR()
Date: Wed, 12 Apr 2017 11:18:56 +0200 [thread overview]
Message-ID: <aeae847b-12c5-9bdf-ece6-76e86f16b76c@enneenne.com> (raw)
In-Reply-To: <20170412083321.GC3250@mwanda>
On 04/12/17 10:33, Dan Carpenter wrote:
> c2port_device_register() never returns NULL, it uses error pointers.
>
> Fixes: 65131cd52b9e ("c2port: add c2port support for Eurotech Duramar 2150")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rodolfo Giometti <giometti@linux.it>
> diff --git a/drivers/misc/c2port/c2port-duramar2150.c b/drivers/misc/c2port/c2port-duramar2150.c
> index 5484301d57d9..3dc61ea7dc64 100644
> --- a/drivers/misc/c2port/c2port-duramar2150.c
> +++ b/drivers/misc/c2port/c2port-duramar2150.c
> @@ -129,8 +129,8 @@ static int __init duramar2150_c2port_init(void)
>
> duramar2150_c2port_dev = c2port_device_register("uc",
> &duramar2150_c2port_ops, NULL);
> - if (!duramar2150_c2port_dev) {
> - ret = -ENODEV;
> + if (IS_ERR(duramar2150_c2port_dev)) {
> + ret = PTR_ERR(duramar2150_c2port_dev);
> goto free_region;
> }
>
>
--
HCE Engineering e-mail: giometti@hce-engineering.com
GNU/Linux Solutions giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Cosino Project - the quick prototyping embedded system - www.cosino.io
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
prev parent reply other threads:[~2017-04-12 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 8:33 Dan Carpenter
2017-04-12 9:18 ` Rodolfo Giometti [this message]
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=aeae847b-12c5-9bdf-ece6-76e86f16b76c@enneenne.com \
--to=giometti@enneenne.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=giometti@linux.it \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®