[PATCH v2 2/2] Staging: comedi: range: remove unnecessary sanity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This check is unnecessary because range_table will always be
initialized to range_unknown by comedi_device_postconfig() for
drivers that do not initialize range_table or range_table_list

Signed-off-by: Fred Akers <knivey@xxxxxxxxxx>
---
 drivers/staging/comedi/range.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c
index c4bb13b..b684954 100644
--- a/drivers/staging/comedi/range.c
+++ b/drivers/staging/comedi/range.c
@@ -143,10 +143,6 @@ int comedi_check_chanlist(struct comedi_subdevice *s, int n,
 	unsigned int chanspec;
 	int chan, range_len, i;
 
-	if (!s->range_table && !s->range_table_list) {
-		dev_err(dev->class_dev, "(bug) no range type list!\n");
-		return -EINVAL;
-	}
 	for (i = 0; i < n; i++) {
 		chanspec = chanlist[i];
 		chan = CR_CHAN(chanspec);
-- 
1.8.5.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux