[PATCH 1/1] staging: cxt1e1: remove null test before kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Daeseok Youn <daeseok.youn@xxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
 drivers/staging/cxt1e1/pmcc4_drv.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c
index 76bebdd..e738264 100644
--- a/drivers/staging/cxt1e1/pmcc4_drv.c
+++ b/drivers/staging/cxt1e1/pmcc4_drv.c
@@ -454,10 +454,7 @@ c4_cleanup (void)
             pi = &ci->port[portnum];
             c4_wq_port_cleanup (pi);
             for (j = 0; j < MUSYCC_NCHANS; j++)
-            {
-                if (pi->chan[j])
-                    kfree(pi->chan[j]);     /* free mch_t struct */
-            }
+                kfree(pi->chan[j]);     /* free mch_t struct */
             kfree(pi->regram_saved);
         }
         kfree(ci->iqd_p_saved);
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux