From f32b15f7254ad6c89f6f59450333f329937db901 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 6 Mar 2000 03:13:17 +0000 Subject: [PATCH] fix range_table==NULL bug --- comedi/comedi_fops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index b4859b60..e3a6c108 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -203,8 +203,12 @@ static int do_subdinfo_ioctl(comedi_device *dev,comedi_subdinfo *arg,void *file) us->timer_type = TIMER_nanosec; us->len_chanlist = s->len_chanlist; us->maxdata = s->maxdata; - us->range_type = (dev->minor<<24)|(i<<20)|(0<<16)| - (s->range_table->length); + if(s->range_table){ + us->range_type = (dev->minor<<24)|(i<<20)|(0<<16)| + (s->range_table->length); + }else{ + us->range_type = 0; /* XXX */ + } us->flags = s->flags; if(s->busy) -- 2.26.2