aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/cio/qdio.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-04-30 13:38:33 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-30 13:38:43 +0200
commit2f972202315cf71fd60e890ebbed7d5bcf620ba4 (patch)
tree80e43d5bacb7b85417168bc257369d3642cc196c /drivers/s390/cio/qdio.c
parent0ff5ce7f30b45cc2014cec465c0e96c16877116e (diff)
[S390] cio: Use strict_strtoul() for attributes.
Make parsing of attribute writes handle incorrect input better. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/qdio.c')
-rw-r--r--drivers/s390/cio/qdio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 43876e28737..445cf364e46 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -3663,11 +3663,11 @@ qdio_performance_stats_show(struct bus_type *bus, char *buf)
static ssize_t
qdio_performance_stats_store(struct bus_type *bus, const char *buf, size_t count)
{
- char *tmp;
- int i;
+ unsigned long i;
+ int ret;
- i = simple_strtoul(buf, &tmp, 16);
- if ((i == 0) || (i == 1)) {
+ ret = strict_strtoul(buf, 16, &i);
+ if (!ret && ((i == 0) || (i == 1))) {
if (i == qdio_performance_stats)
return count;
qdio_performance_stats = i;