staging: comedi: drivers: Remove unneeded NULL check before kfree()
Remove NULL check before kfree as it is not needed.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index cac011f..656df1a 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -1096,10 +1096,8 @@
struct pci224_private *devpriv = dev->private;
comedi_pci_detach(dev);
- if (devpriv) {
- kfree(devpriv->ao_scan_vals);
- kfree(devpriv->ao_scan_order);
- }
+ kfree(devpriv->ao_scan_vals);
+ kfree(devpriv->ao_scan_order);
}
static struct comedi_driver amplc_pci224_driver = {