Staging: comedi: Remove checks for NULL before calling kfree()
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
51b713a684
commit
dedd1325f1
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue