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)
commitf25bd6bfdf9bccd8164c151b027f9c14ec07960b
treef3574b5fb8f244845b0dd8fdfaea3ca1ba36b9bd
parentc5da20905c8ce21a73a9b443e5d7ef0dc623cff0
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