diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-04-30 07:38:33 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:43 -0400 |
commit | 2f972202315cf71fd60e890ebbed7d5bcf620ba4 (patch) | |
tree | 80e43d5bacb7b85417168bc257369d3642cc196c /drivers/s390/cio/qdio.c | |
parent | 0ff5ce7f30b45cc2014cec465c0e96c16877116e (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 43876e287370..445cf364e461 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) | |||
3663 | static ssize_t | 3663 | static ssize_t |
3664 | qdio_performance_stats_store(struct bus_type *bus, const char *buf, size_t count) | 3664 | qdio_performance_stats_store(struct bus_type *bus, const char *buf, size_t count) |
3665 | { | 3665 | { |
3666 | char *tmp; | 3666 | unsigned long i; |
3667 | int i; | 3667 | int ret; |
3668 | 3668 | ||
3669 | i = simple_strtoul(buf, &tmp, 16); | 3669 | ret = strict_strtoul(buf, 16, &i); |
3670 | if ((i == 0) || (i == 1)) { | 3670 | if (!ret && ((i == 0) || (i == 1))) { |
3671 | if (i == qdio_performance_stats) | 3671 | if (i == qdio_performance_stats) |
3672 | return count; | 3672 | return count; |
3673 | qdio_performance_stats = i; | 3673 | qdio_performance_stats = i; |