From e8abca1f30239f6c979f60df49305a602672cb94 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 26 Jun 2012 10:08:52 -0700 Subject: [PATCH] staging: comedi: cb_das16_cs: remove unneeded default case in analog in read 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 Reported-by: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- 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 95fa7e2fea9d..58d45299bf85 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); -- 2.34.1