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