Skip to content

Commit

Permalink
mt76: mt7915: do not copy ieee80211_ops pointer in mt7915_mmio_probe
Browse files Browse the repository at this point in the history
We do not modify ieee80211_ops pointers so we do not need to copy them.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Jun 22, 2022
1 parent 7275f77 commit 1696f9e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mt7915/mmio.c
Expand Up @@ -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);

Expand Down

0 comments on commit 1696f9e

Please sign in to comment.