staging: comedi: serial2002: fix Coverity "Explicit null dereference"
staging: comedi: serial2002: fix Coverity "Explicit null dereference"

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. Each channel of the subdevice then has it's 'range' initialized
and that range is added to the range_table_list.

The logic of this function works but causes Coverity complain about an
Explicit null dereference of the allocated 'range_table_list'. Add a check
for the 'range_table_list' to quiet the Coverity issue.

Reported-by: coverity (CID 1011632)
Signed-off-by: H Hartley Sweeten <382ff55d8e07d1082d179e669636cd1552da4f36@visionengravers.com>
Reviewed-by: Ian Abbott <9e6ba6483b6a3e14d61f7c987e72ecb5b46122d6@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs