From: Bill Pemberton Date: Tue, 17 Mar 2009 02:04:18 +0000 (-0400) Subject: Staging: comedi: Remove checks for NULL before calling kfree() X-Git-Tag: firefly_0821_release~14777^2~297 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dedd1325f1d53e2a2604457c4b3af9e62dde5001;p=firefly-linux-kernel-4.4.55.git Staging: comedi: Remove checks for NULL before calling kfree() Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index a252081b6a08..07456c0709dc 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -81,10 +81,8 @@ static void cleanup_device(comedi_device *dev) dev->subdevices = NULL; dev->n_subdevices = 0; } - if (dev->private) { - kfree(dev->private); - dev->private = NULL; - } + kfree(dev->private); + dev->private = NULL; dev->driver = 0; dev->board_name = NULL; dev->board_ptr = NULL;