From 9718e5dfd7e19a2fb0d98a9afdb0459ba6b5d41f Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 22 Mar 2013 09:47:20 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/ni_labpc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index f9c7209..56d6084 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]); -- 2.7.4