From: H Hartley Sweeten Date: Thu, 6 Mar 2014 19:02:57 +0000 (-0700) Subject: staging: comedi: comedi_fops: introduce __comedi_get_user_chanlist() X-Git-Tag: v3.15-rc1~139^2~321 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6cd0eefb27b;p=pandora-kernel.git 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed