diff options
Diffstat (limited to 'drivers/md/dm-queue-length.c')
| -rw-r--r-- | drivers/md/dm-queue-length.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-queue-length.c b/drivers/md/dm-queue-length.c index 03a837aa5ce..3941fae0de9 100644 --- a/drivers/md/dm-queue-length.c +++ b/drivers/md/dm-queue-length.c @@ -112,6 +112,7 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,  	struct selector *s = ps->context;  	struct path_info *pi;  	unsigned repeat_count = QL_MIN_IO; +	char dummy;  	/*  	 * Arguments: [<repeat_count>] @@ -123,7 +124,7 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,  		return -EINVAL;  	} -	if ((argc == 1) && (sscanf(argv[0], "%u", &repeat_count) != 1)) { +	if ((argc == 1) && (sscanf(argv[0], "%u%c", &repeat_count, &dummy) != 1)) {  		*error = "queue-length ps: invalid repeat count";  		return -EINVAL;  	}  |