lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aeae847b-12c5-9bdf-ece6-76e86f16b76c@enneenne.com>
Date:   Wed, 12 Apr 2017 11:18:56 +0200
From:   Rodolfo Giometti <giometti@...eenne.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        linux-kernel@...r.kernel.org, Rodolfo Giometti <giometti@...ux.it>
Cc:     kernel-janitors@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] c2port: checking for NULL instead of IS_ERR()

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@...cle.com>

Acked-by: Rodolfo Giometti <giometti@...ux.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@...-engineering.com
GNU/Linux Solutions                          giometti@...eenne.com
Linux Device Driver                          giometti@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ