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:
Родитель
51b713a684
Коммит
dedd1325f1
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче