Staging: comedi: Remove checks for NULL before calling kfree()
authorBill Pemberton <wfp5p@virginia.edu>
Tue, 17 Mar 2009 02:04:18 +0000 (22:04 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:54 +0000 (14:53 -0700)
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers.c

index a252081..07456c0 100644 (file)
@@ -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;