Commit dedd1325 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove checks for NULL before calling kfree()

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 51b713a6
...@@ -81,10 +81,8 @@ static void cleanup_device(comedi_device *dev) ...@@ -81,10 +81,8 @@ static void cleanup_device(comedi_device *dev)
dev->subdevices = NULL; dev->subdevices = NULL;
dev->n_subdevices = 0; dev->n_subdevices = 0;
} }
if (dev->private) { kfree(dev->private);
kfree(dev->private); dev->private = NULL;
dev->private = NULL;
}
dev->driver = 0; dev->driver = 0;
dev->board_name = NULL; dev->board_name = NULL;
dev->board_ptr = NULL; dev->board_ptr = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment