diff options
author | H Hartley Sweeten | 2015-04-20 20:49:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-04-30 17:15:59 +0200 |
commit | a437dee5335e3b5fdb82199f11eebf3f41bf5b8e (patch) | |
tree | 2737c421c9a0e22d81d89a3ae3469727ffb1cfb6 /drivers/staging/comedi/comedi_fops.c | |
parent | staging: comedi: ni_nio_common: don't write non-existing caldac's (diff) | |
download | kernel-qcow2-linux-a437dee5335e3b5fdb82199f11eebf3f41bf5b8e.tar.gz kernel-qcow2-linux-a437dee5335e3b5fdb82199f11eebf3f41bf5b8e.tar.xz kernel-qcow2-linux-a437dee5335e3b5fdb82199f11eebf3f41bf5b8e.zip |
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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
0 files changed, 0 insertions, 0 deletions