• Brian Norris's avatar
    ath10k: don't assume this is a PCI dev in generic code · 79169f14
    Brian Norris authored
    Not all devices using this driver are backed by a PCI device, so it's
    not fair to assume 'to_pci_dev()' is valid. Fortunately, we only were
    using this to convert straight back to a bare 'device', which means we
    were only doing no-op pointer arithmetic, and not actually accessing
    potentially out-of-bounds memory. But this is still bad practice.
    
    Just use 'ar->dev' directly, since that's really all we're looking for.
    
    Fixes: 209b2a68 ("ath10k: add platform regulatory domain support")
    Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    79169f14
mac.c 220 KB