mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eli Lindsey <eli@siliconsprawl.com>
To: gregkh@suse.de, d@teklibre.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Eli Lindsey <eli@siliconsprawl.com>
Subject: [PATCH 3/4] staging: frontier: switch to strict_strtoul in tranzport.c
Date: Tue,  9 Mar 2010 00:15:32 -0600	[thread overview]
Message-ID: <1268115333-7971-3-git-send-email-eli@siliconsprawl.com> (raw)
In-Reply-To: <1268115333-7971-2-git-send-email-eli@siliconsprawl.com>

This is a patch to tranzport.c that changes a use of simple_strtoul to
strict_strtoul at the suggestion of checkpatch.pl

Signed-off-by: Eli Lindsey <eli@siliconsprawl.com>
---
 drivers/staging/frontier/tranzport.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c
index 1f91001..f9ab4f3 100644
--- a/drivers/staging/frontier/tranzport.c
+++ b/drivers/staging/frontier/tranzport.c
@@ -198,7 +198,9 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev)
   {									\
     struct usb_interface *intf = to_usb_interface(dev);			\
     struct usb_tranzport *t = usb_get_intfdata(intf);			\
-    int temp = simple_strtoul(buf, NULL, 10);				\
+    unsigned long temp;							\
+    if (strict_strtoul(buf, 10, &temp))					\
+	return -EINVAL;							\
     t->value = temp;							\
     return count;							\
   }									\
-- 
1.6.3.3


  reply	other threads:[~2010-03-09  6:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  6:15 [PATCH 1/4] staging: frontier: fix extra spaces " Eli Lindsey
2010-03-09  6:15 ` [PATCH 2/4] staging: frontier: fix extra spaces in alphatrack.c Eli Lindsey
2010-03-09  6:15   ` Eli Lindsey [this message]
2010-03-09  6:15     ` [PATCH 4/4] staging: frontier: switch semaphores to mutexes Eli Lindsey
2010-04-08 20:21   ` [PATCH 2/4] staging: frontier: fix extra spaces in alphatrack.c Greg KH
2010-04-08 20:20 ` [PATCH 1/4] staging: frontier: fix extra spaces in tranzport.c Greg KH

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=1268115333-7971-3-git-send-email-eli@siliconsprawl.com \
    --to=eli@siliconsprawl.com \
    --cc=d@teklibre.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --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

Powered by JetHome