diff options
author | Chase Southwood <chase.southwood@yahoo.com> | 2014-02-15 03:59:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-15 20:42:41 (GMT) |
commit | e6bed035ca652c43c897731366ea816ea2c4fbf1 (patch) | |
tree | e62d9524cb05e98d0f06ad043c6f3f2b8ea019e7 /drivers/staging/comedi/kcomedilib | |
parent | 60800abdc147ba034204408cc4745d66e1ffbb8e (diff) | |
download | linux-e6bed035ca652c43c897731366ea816ea2c4fbf1.tar.xz |
Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()
Since simple_strtoul() has been deprecated, replace it with kstrtouint().
Also, since return code checking for this new function is enforced, add a
check to ensure that the conversion has succeeded.
Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/kcomedilib')
-rw-r--r-- | drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 7dc5a18..8777f95 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -41,7 +41,8 @@ struct comedi_device *comedi_open(const char *filename) if (strncmp(filename, "/dev/comedi", 11) != 0) return NULL; - minor = simple_strtoul(filename + 11, NULL, 0); + if (kstrtouint(filename + 11, 0, &minor)) + return NULL; if (minor >= COMEDI_NUM_BOARD_MINORS) return NULL; |