Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1282955
| From | "Charles (Chas) Williams" <3chas3@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint |
| Date | 2015-12-03 12:30 +0100 |
| Message-ID | <qBAff-4hh-1@gated-at.bofh.it> (permalink) |
| References | <qBx7I-2kH-1@gated-at.bofh.it> <qBx7I-2kH-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/1] atm: solos-pci: Replace simple_strtol by kstrtoint LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-12-03 09:10 +0100
[PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-12-03 09:10 +0100
Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint "Charles (Chas) Williams" <3chas3@gmail.com> - 2015-12-03 12:30 +0100
Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint LABBE Corentin <clabbe.montjoie@gmail.com> - 2015-12-03 14:00 +0100
Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint "Charles (Chas) Williams" <3chas3@gmail.com> - 2015-12-03 17:40 +0100
csiph-web