From: H Hartley Sweeten Date: Fri, 14 Aug 2015 22:23:30 +0000 (-0700) Subject: staging: comedi: usbdux: remove impossible 'if (!devpriv)' check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2779b7e51497b5d0855dc7d21d793998acd2ad5f;p=linux-beck.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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index d576af734407..eea41e8ad1ac 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -877,13 +877,9 @@ ao_trig_exit: 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);