From d4150246eb403eee756516c98e7ebc5792cb34f7 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Wed, 18 Jun 2014 16:51:29 +0200 Subject: [PATCH] drivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: Ivo van Doorn Cc: Helmut Schaa Signed-off-by: Fabian Frederick Signed-off-by: John W. Linville --- drivers/net/wireless/rt2x00/rt2x00dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 72e3e8138111..c6ae9a495b77 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -1455,8 +1455,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) /* * Free the driver data. */ - if (rt2x00dev->drv_data) - kfree(rt2x00dev->drv_data); + kfree(rt2x00dev->drv_data); } EXPORT_SYMBOL_GPL(rt2x00lib_remove_dev); -- 2.39.5