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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Dec 2015 11:27:11 +0100
From:	Andrzej Hajda <a.hajda@...sung.com>
To:	linux-kernel@...r.kernel.org
Cc:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Sebastian Reichel <sre@...nel.org>
Subject: Re: [PATCH 11/38] HSI: omap_ssi: fix handling ida_simple_get result

Hi,

Ping - almost three months passed.

Regards
Andrzej


On 09/21/2015 03:33 PM, Andrzej Hajda wrote:
> The function can return negative value.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
>
> Signed-off-by: Andrzej Hajda <a.hajda@...sung.com>
> ---
>  drivers/hsi/controllers/omap_ssi.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c
> index 089c6c3..5d9225f 100644
> --- a/drivers/hsi/controllers/omap_ssi.c
> +++ b/drivers/hsi/controllers/omap_ssi.c
> @@ -336,11 +336,10 @@ static int __init ssi_add_controller(struct hsi_controller *ssi,
>  		return -ENOMEM;
>  	}
>  
> -	ssi->id = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
> -	if (ssi->id < 0) {
> -		err = ssi->id;
> +	err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
> +	if (err < 0)
>  		goto out_err;
> -	}
> +	ssi->id = err;
>  
>  	ssi->owner = THIS_MODULE;
>  	ssi->device.parent = &pd->dev;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ