diff options
author | Janani Ravichandran <janani.rvchndrn@gmail.com> | 2016-02-24 01:36:04 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-05 23:56:55 +0100 |
commit | 3545bee9b8ec00ba733e17363f494c8761fb5e49 (patch) | |
tree | 50f9ff17d874247082ededd9a2a7c3c772482e06 /drivers | |
parent | Staging: comedi: contec_pci_dio: fixed comment blocks coding style issues (diff) | |
download | linux-3545bee9b8ec00ba733e17363f494c8761fb5e49.tar.xz linux-3545bee9b8ec00ba733e17363f494c8761fb5e49.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pci224.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index cac011fdd375..656df1abce89 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -1096,10 +1096,8 @@ static void pci224_detach(struct comedi_device *dev) 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 = { |