Skip to contentSkip to conversation

staging: comedi: cb_das16_cs: remove unneeded default case in analog in read

PATCH New H Hartley Sweeten 1 participant 1 message Jun 26, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 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.

Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/comedi/drivers/cb_das16_cs.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/comedi/drivers/cb_das16_cs.c +0 -2
index 95fa7e2..58d4529 100644
@@ -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);
 
Signature · 1 line
1.7.11