lkml.org 
[lkml]   [2012]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] staging: comedi: cb_das16_cs: remove unneeded default case in analog in read
Date
The default (return -EINVAL) case is not needed when working
out the correct value to set the analog input range. As pointed
out by Ian Abbott, the comedi core checks the range in
comedi_check_chanlist() before calling the insn_read() function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/comedi/drivers/cb_das16_cs.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index 95fa7e2..58d4529 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -136,8 +136,6 @@ static int das16cs_ai_rinsn(struct comedi_device *dev,
case 3:
devpriv->status2 |= 0x200;
break;
- default:
- return -EINVAL;
}
outw(devpriv->status2, dev->iobase + DAS16CS_MISC2);

--
1.7.11


\
 
 \ /
  Last update: 2012-06-26 20:01    [W:0.024 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site