]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mt76: mt7603: add missing initialization for dev->ps_lock
authorFelix Fietkau <nbd@nbd.name>
Tue, 26 Mar 2019 08:34:19 +0000 (09:34 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 12 Apr 2019 18:28:25 +0000 (21:28 +0300)
Fixes lockdep complaint and a potential race condition

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt7603/init.c

index d54dda67d036c19cffce6bc30765c39dc93ee326..3af45949e868909e3073335cc302411c5e6c9761 100644 (file)
@@ -510,6 +510,8 @@ int mt7603_register_device(struct mt7603_dev *dev)
        bus_ops->rmw = mt7603_rmw;
        dev->mt76.bus = bus_ops;
 
+       spin_lock_init(&dev->ps_lock);
+
        INIT_DELAYED_WORK(&dev->mac_work, mt7603_mac_work);
        tasklet_init(&dev->pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet,
                     (unsigned long)dev);