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]
Message-ID: <1449141991.2645.67.camel@gmail.com>
Date:	Thu, 03 Dec 2015 06:26:31 -0500
From:	"Charles (Chas) Williams" <3chas3@...il.com>
To:	LABBE Corentin <clabbe.montjoie@...il.com>
Cc:	linux-atm-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by
 kstrtoint

On Thu, 2015-12-03 at 09:06 +0100, LABBE Corentin wrote:
> @@ -357,11 +357,11 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
>  	if (!str)
>  		return -EIO;
>  
> -	ver = simple_strtol(str, NULL, 10);
> -	if (ver < 1) {
> +	err = kstrtoint(str, 10, &ver);
> +	if (err || ver < 1) {
>  		dev_warn(&card->dev->dev, "Unexpected status interrupt version %d\n",
>  			 ver);
> -		return -EIO;
> +		return err;


If ver < 1 then you might return a 0 here.  Always returning -EIO is
probably just fine.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ