From: Lorenzo Bianconi Date: Tue, 21 Jun 2022 22:51:24 +0000 (+0200) Subject: mt76: mt7915: do not copy ieee80211_ops pointer in mt7915_mmio_probe X-Git-Tag: v6.1-rc5~731^2~64^2~53^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8dae26a3bddf8bcd81f6f13de8c9ea085e64cdea;p=platform%2Fkernel%2Flinux-starfive.git mt76: mt7915: do not copy ieee80211_ops pointer in mt7915_mmio_probe We do not modify ieee80211_ops pointers so we do not need to copy them. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c index c2646d2..930fae7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c @@ -661,16 +661,11 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev, .sta_remove = mt7915_mac_sta_remove, .update_survey = mt7915_update_channel, }; - struct ieee80211_ops *ops; struct mt7915_dev *dev; struct mt76_dev *mdev; int ret; - ops = devm_kmemdup(pdev, &mt7915_ops, sizeof(mt7915_ops), GFP_KERNEL); - if (!ops) - return ERR_PTR(-ENOMEM); - - mdev = mt76_alloc_device(pdev, sizeof(*dev), ops, &drv_ops); + mdev = mt76_alloc_device(pdev, sizeof(*dev), &mt7915_ops, &drv_ops); if (!mdev) return ERR_PTR(-ENOMEM);