mt76: set fops_tx_stats.owner to THIS_MODULE
authorTaehee Yoo <ap420073@gmail.com>
Thu, 8 Oct 2020 15:51:56 +0000 (15:51 +0000)
committerFelix Fietkau <nbd@nbd.name>
Fri, 4 Dec 2020 12:46:16 +0000 (13:46 +0100)
If THIS_MODULE is not set, the module would be removed while debugfs is
being used.
It eventually makes kernel panic.

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c

index d2ac7e5..8f2ad32 100644 (file)
@@ -233,6 +233,7 @@ static const struct file_operations fops_tx_stats = {
        .read = seq_read,
        .llseek = seq_lseek,
        .release = single_release,
+       .owner = THIS_MODULE,
 };
 
 static int mt7915_read_temperature(struct seq_file *s, void *data)