From: Fred Akers Date: Thu, 6 Mar 2014 06:57:19 +0000 (-0500) Subject: Staging: comedi: range: remove unnecessary sanity check X-Git-Tag: firefly_0821_release~176^2~4193^2~519 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=56b1fcfdeb5897c3406647f2e416d853ffd234c8;p=firefly-linux-kernel-4.4.55.git Staging: comedi: range: remove unnecessary sanity check 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 Reviewed-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index c4bb13bab934..b6849545b810 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);