diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-02-10 11:49:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-14 09:28:47 -0800 |
commit | dbd446fc7aab519c213e63eefa15c82586a50989 (patch) | |
tree | 2887efc65894f24905969816d883e6c31a72cac0 /drivers/staging/comedi/drivers/icp_multi.c | |
parent | staging: comedi: move (*insn_{read, write}) timeout debug messages to core (diff) | |
download | linux-dev-dbd446fc7aab519c213e63eefa15c82586a50989.tar.xz linux-dev-dbd446fc7aab519c213e63eefa15c82586a50989.zip |
staging: comedi: don't clear 'data' on (*insn_read) timeout
It's not necessary to clear the returned data pointer when an (*insn_read)
times out. For aesthetics, remove all of these in the drivers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/icp_multi.c')
-rw-r--r-- | drivers/staging/comedi/drivers/icp_multi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index ee30f2b8a54b..0b8b2162b76b 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -215,11 +215,8 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev, /* Wait for conversion to complete, or get fed up waiting */ ret = comedi_timeout(dev, s, insn, icp_multi_ai_eoc, 0); - if (ret) { - /* Clear data received */ - data[n] = 0; + if (ret) break; - } data[n] = (readw(devpriv->io_addr + ICP_MULTI_AI) >> 4) & 0x0fff; |