]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: comedi: cleanup: remove unneeded null checks
authorDan Carpenter <error27@gmail.com>
Sat, 22 May 2010 20:42:38 +0000 (22:42 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Jun 2010 20:36:33 +0000 (13:36 -0700)
commitb7ae5c0c92e05d9f6c1dbc880af13b8477c2547c
treef3574b5fb8f244845b0dd8fdfaea3ca1ba36b9bd
parentfd649dab54d2adcc54fa8905bd00d8edbcd7d052
Staging: comedi: cleanup: remove unneeded null checks

These checks are obviously pointless because kfree() can handle null
dereferences.

But really the main problem is that if the pointers were null that would
cause problems on the ealier lines.  The dereferences would cause an
oops and the _release() functions use ->priv to determine which IRQ to
free.  I looked into it and quite a few of the detach functions assume
link->priv is non-null.  It seems like we can remove these checks.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/cb_das16_cs.c
drivers/staging/comedi/drivers/das08_cs.c
drivers/staging/comedi/drivers/ni_daq_700.c
drivers/staging/comedi/drivers/ni_daq_dio24.c
drivers/staging/comedi/drivers/quatech_daqp_cs.c