On 12/01/16 17:33, Spencer E. Olson wrote:
This fixes a bug in function ni_tio_input_inttrig().  The trigger number
should be compared to cmd->start_arg, not cmd->start_src.

Fixes: 6a760394d7eb ("staging: comedi: ni_tiocmd: clarify the
cmd->start_arg validation and use")
Cc: <sta...@vger.kernel.org> # 3.17+
Signed-off-by: Spencer E. Olson <olso...@umich.edu>
---
  Added description suggested by Ian and Dan.  Added Fixes:, CC: tags as
  suggested by Ian.

  drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c 
b/drivers/staging/comedi/drivers/ni_tiocmd.c
index 437f723..823e479 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -92,7 +92,7 @@ static int ni_tio_input_inttrig(struct comedi_device *dev,
        unsigned long flags;
        int ret = 0;

-       if (trig_num != cmd->start_src)
+       if (trig_num != cmd->start_arg)
                return -EINVAL;

        spin_lock_irqsave(&counter->lock, flags);


Thanks!

Reviewed-by: Ian Abbott <abbo...@mev.co.uk>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to