From: Fabian Frederick Date: Wed, 18 Jun 2014 14:51:29 +0000 (+0200) Subject: drivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d4150246eb403eee756516c98e7ebc5792cb34f7;p=linux-beck.git 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 --- 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);