staging: rtl8192e: rtl8192e: Remove NULL test before vfree
authorShyam Saini <mayhs11saini@gmail.com>
Sun, 15 Jan 2017 12:51:46 +0000 (18:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jan 2017 17:08:57 +0000 (18:08 +0100)
vfree frees the virtually continuous block of memory beginning at addr.
If addr is NULL, no operation is performed. So, NULL test is not needed
before vfree.

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c

index 2e05ec92ae201685fff11c6424e08de32795a74e..4c0caa6701a996967dcba3672196e1e08a0965f0 100644 (file)
@@ -2695,10 +2695,8 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)
                priv->polling_timer_on = 0;
                _rtl92e_down(dev, true);
                rtl92e_dm_deinit(dev);
-               if (priv->pFirmware) {
-                       vfree(priv->pFirmware);
-                       priv->pFirmware = NULL;
-               }
+               vfree(priv->pFirmware);
+               priv->pFirmware = NULL;
                _rtl92e_free_rx_ring(dev);
                for (i = 0; i < MAX_TX_QUEUE_COUNT; i++)
                        _rtl92e_free_tx_ring(dev, i);