From: David Schleef Date: Mon, 6 Mar 2000 03:13:17 +0000 (+0000) Subject: fix range_table==NULL bug X-Git-Tag: r0_7_40~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f32b15f7254ad6c89f6f59450333f329937db901;p=comedi.git fix range_table==NULL bug --- 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)