diff options
author | Spencer E. Olson <olsonse@umich.edu> | 2016-01-12 10:33:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-12 09:08:48 -0700 |
commit | a5e8deb7f07fb8f7d34c908dea303ba948752916 (patch) | |
tree | d983a3ff7f4c70bd52c2791efa62ec9db4fc8091 | |
parent | b2fb06096e2538e131bd9551eb5a70ba42c1b3f7 (diff) | |
download | linux-stable-a5e8deb7f07fb8f7d34c908dea303ba948752916.tar.gz linux-stable-a5e8deb7f07fb8f7d34c908dea303ba948752916.tar.bz2 linux-stable-a5e8deb7f07fb8f7d34c908dea303ba948752916.zip |
staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
commit 1fd24a4702d2af0ea4d5845126cf57d4d1796216 upstream.
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")
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tiocmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c index 437f723bb34d..823e47910004 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); |