aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-04-30 07:38:33 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-30 07:38:43 -0400
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 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)
3663static ssize_t 3663static ssize_t
3664qdio_performance_stats_store(struct bus_type *bus, const char *buf, size_t count) 3664qdio_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;