提交 e6bed035 编写于 作者: C Chase Southwood 提交者: Greg Kroah-Hartman

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: NChase Southwood <chase.southwood@yahoo.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 60800abd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册