[PATCH 3/3] staging: comedi: serial2002: fix Coverity "Explicit null dereference"

2015-04-27 Thread H Hartley Sweeten
serial2002_setup_subdevices() initializes each subdevice based on the config read from the attached serial device. Part of this initialization is to setup the subdevice range_table_list for the non digital subdevices. The range_table_list is allocated only when a 'range' is passed to the functions.

Re: [PATCH 3/3] staging: comedi: serial2002: fix Coverity "Explicit null dereference"

2015-04-21 Thread Dan Carpenter
Yeah. That's tricky code for a static checker. You have to know that if the caller passes kind = 1 or 2 then range is NULL. The caller users S2002_CFG_KIND_DIGITAL_IN and S2002_CFG_KIND_DIGITAL_OUT for 1 and 2. regards, dan carpenter ___ devel mailin

[PATCH 3/3] staging: comedi: serial2002: fix Coverity "Explicit null dereference"

2015-04-20 Thread H Hartley Sweeten
serial2002_setup_subdevices() initializes each subdevice based on the config read from the attached serial device. Part of this initialization is to setup the subdevice range_table_list for the non digital subdevices. The range_table_list is allocated only when a 'range' is passed to the functions.