|
@@ -41,7 +41,8 @@ struct comedi_device *comedi_open(const char *filename)
|
|
if (strncmp(filename, "/dev/comedi", 11) != 0)
|
|
if (strncmp(filename, "/dev/comedi", 11) != 0)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- minor = simple_strtoul(filename + 11, NULL, 0);
|
|
|
|
|
|
+ if (kstrtouint(filename + 11, 0, &minor))
|
|
|
|
+ return NULL;
|
|
|
|
|
|
if (minor >= COMEDI_NUM_BOARD_MINORS)
|
|
if (minor >= COMEDI_NUM_BOARD_MINORS)
|
|
return NULL;
|
|
return NULL;
|