mirror of https://gitee.com/openkylin/linux.git
Revert "staging: comedi: drivers: Remove unneeded NULL check before kfree()"
This reverts commit 3545bee9b8
.
It's not correct.
Reported-by: Hartley Sweeten <HartleyS@visionengravers.com>
Cc: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b44483e7be
commit
7bf777fbfe
|
@ -1096,8 +1096,10 @@ static void pci224_detach(struct comedi_device *dev)
|
|||
struct pci224_private *devpriv = dev->private;
|
||||
|
||||
comedi_pci_detach(dev);
|
||||
kfree(devpriv->ao_scan_vals);
|
||||
kfree(devpriv->ao_scan_order);
|
||||
if (devpriv) {
|
||||
kfree(devpriv->ao_scan_vals);
|
||||
kfree(devpriv->ao_scan_order);
|
||||
}
|
||||
}
|
||||
|
||||
static struct comedi_driver amplc_pci224_driver = {
|
||||
|
|
Loading…
Reference in New Issue