[PATCH 1/1] staging: gdm72xx: Remove redundant null check before kfree in gdm_wimax.c

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

 



kfree on a null pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
 drivers/staging/gdm72xx/gdm_wimax.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index c302769..ea5accd 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -535,10 +535,8 @@ static int gdm_wimax_close(struct net_device *dev)
 
 static void kdelete(void **buf)
 {
-	if (buf && *buf) {
-		kfree(*buf);
-		*buf = NULL;
-	}
+	kfree(*buf);
+	*buf = NULL;
 }
 
 static int gdm_wimax_ioctl_get_data(struct data_s *dst, struct data_s *src)
-- 
1.7.4.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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