From: Spencer E. Olson Date: Tue, 12 Jan 2016 17:33:18 +0000 (-0700) Subject: staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg X-Git-Tag: v4.6~331^2~1180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fd24a4702d2af0ea4d5845126cf57d4d1796216;p=platform%2Fkernel%2Flinux-amlogic.git staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg 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: # 3.17+ Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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);