Bluetooth: Fix issue in the Set LE privacy function.
[platform/kernel/linux-rpi.git] / net / ax25 / ax25_dev.c
index 9a3a301..d92195c 100644 (file)
@@ -116,6 +116,7 @@ void ax25_dev_device_down(struct net_device *dev)
        if ((s = ax25_dev_list) == ax25_dev) {
                ax25_dev_list = s->next;
                spin_unlock_bh(&ax25_dev_lock);
+               dev->ax25_ptr = NULL;
                dev_put(dev);
                kfree(ax25_dev);
                return;
@@ -125,6 +126,7 @@ void ax25_dev_device_down(struct net_device *dev)
                if (s->next == ax25_dev) {
                        s->next = ax25_dev->next;
                        spin_unlock_bh(&ax25_dev_lock);
+                       dev->ax25_ptr = NULL;
                        dev_put(dev);
                        kfree(ax25_dev);
                        return;