drivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree
authorFabian Frederick <fabf@skynet.be>
Wed, 18 Jun 2014 14:51:29 +0000 (16:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Jun 2014 19:49:27 +0000 (15:49 -0400)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 72e3e8138111bec3b4cb4e506b82c3f785fcbb38..c6ae9a495b77e61b5c031077d8bb54181233ffa3 100644 (file)
@@ -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);