ieee802154: 6lowpan: remove check on null
authorAlexander Aring <alex.aring@gmail.com>
Wed, 2 Sep 2015 12:21:18 +0000 (14:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Sep 2015 11:20:02 +0000 (13:20 +0200)
This patch removes one check on null which should be already done by
checking before for ARPHRD_IEEE802154. All ARPHRD_IEEE802154 and
ARPHRD_IEEE802154_MONITOR should have wdev->ieee802154_ptr, where
ARPHRD_IEEE802154 is currently a node interface only.

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/6lowpan/core.c

index 5b418ce92fd8c22cd1b05355e4396d810ed23267..3b7521001a9e946b460d5f38a3f67f3e56beffc5 100644 (file)
@@ -214,7 +214,7 @@ static int lowpan_device_event(struct notifier_block *unused,
                 * also delete possible lowpan interfaces which belongs
                 * to the wpan interface.
                 */
-               if (wdev->ieee802154_ptr && wdev->ieee802154_ptr->lowpan_dev)
+               if (wdev->ieee802154_ptr->lowpan_dev)
                        lowpan_dellink(wdev->ieee802154_ptr->lowpan_dev, NULL);
                break;
        default: