diff options
author | Cheah Kok Cheong <thrust73@gmail.com> | 2017-02-22 01:25:08 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:16:58 +0100 |
commit | 607b6cd3d083ae1deaf93ff2634abe147459c9bc (patch) | |
tree | 6fd2d290b37b1998de689dc6b252ca6647330b15 /drivers/staging/comedi | |
parent | 7dfc6971243430dd9edef3c4c0694d3a97b321f7 (diff) |
Staging: comedi: drivers: comedi_test: Avoid multiple line dereference
Fix checkpatch warning "Avoid multiple line dereference"
using a pointer variable to avoid line wrap.
Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index 2a063f07fe7b..ccfd642998be 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -480,11 +480,11 @@ static void waveform_ao_timer(unsigned long arg) /* output the last scan */ for (i = 0; i < cmd->scan_end_arg; i++) { unsigned int chan = CR_CHAN(cmd->chanlist[i]); + unsigned short *pd; - if (comedi_buf_read_samples(s, - &devpriv-> - ao_loopbacks[chan], - 1) == 0) { + pd = &devpriv->ao_loopbacks[chan]; + + if (!comedi_buf_read_samples(s, pd, 1)) { /* unexpected underrun! (cancelled?) */ async->events |= COMEDI_CB_OVERFLOW; goto underrun; |