mirror of https://gitee.com/openkylin/linux.git
staging: comedi: usbdux: remove impossible 'if (!devpriv)' check
The comedi core can only call this subdevice function is the private data was successfully allocated during the (*auto_attach). Remove the unnecessary check. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1e4c3a2e7d
commit
2779b7e514
|
@ -877,13 +877,9 @@ static int usbdux_ao_inttrig(struct comedi_device *dev,
|
|||
static int usbdux_ao_cmdtest(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
struct usbdux_private *devpriv = dev->private;
|
||||
int err = 0;
|
||||
unsigned int flags;
|
||||
|
||||
if (!devpriv)
|
||||
return -EFAULT;
|
||||
|
||||
/* Step 1 : check if triggers are trivially valid */
|
||||
|
||||
err |= comedi_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_INT);
|
||||
|
|
Loading…
Reference in New Issue