diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-06 12:02:57 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 12:27:58 -0700 |
| commit | c6cd0eefb27b47a3f67ec0adbea14b4f97d72ec9 (patch) | |
| tree | e48cc0a4fe3a948b8350ff8a7586ad73b97bc21f /tools/perf/scripts/python | |
| parent | 87ece583310d47bcf0027e4a77c990bbb010fc5e (diff) | |
staging: comedi: comedi_fops: introduce __comedi_get_user_chanlist()
The COMEDI_CMD and COMEDI_CMDTEST ioctl functions both copy the chanlist
passed by the user from __user memory space to kernel memory space. They
then do some sanity checking of the chanlist with comedi_check_chanlist()
before the subdevice (*do_cmdtest) and (*do_cmd) operations are called.
Introduce a helper function to handle the memdup_user() and the sanity
checking.
Also, remove the unnecessary dev_dbg() when the memdup_user() or
comedi_check_chanlist() fail.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
