diff options
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index e27806d6458c..2888fdccd7ad 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -2024,9 +2024,10 @@ static ssize_t mmc_test_store(struct device *dev, { struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_test_card *test; - int testcase; + long testcase; - testcase = simple_strtol(buf, NULL, 10); + if (strict_strtol(buf, 10, &testcase)) + return -EINVAL; test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL); if (!test) |