From: H Hartley Sweeten Date: Fri, 22 Mar 2013 16:47:20 +0000 (-0700) Subject: staging: comedi: ni_labpc: remove unnecessary test of dev->irq X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9718e5dfd7e19a2fb0d98a9afdb0459ba6b5d41f;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: ni_labpc: remove unnecessary test of dev->irq The ai subdevice (*do_cmd) pointer is only initialized if the driver has successfully requested the interrupt. The extra test in labpc_ai_cmd() is not necessary. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index f9c720938e27..56d60847f820 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -858,11 +858,6 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) enum scan_mode mode; unsigned long flags; - if (!dev->irq) { - comedi_error(dev, "no irq assigned, cannot perform command"); - return -1; - } - range = CR_RANGE(cmd->chanlist[0]); aref = CR_AREF(cmd->chanlist[0]);