]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Intel: Skylake: Unmap the address last
authorVinod Koul <vinod.koul@intel.com>
Tue, 15 Mar 2016 11:09:26 +0000 (16:39 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2016 10:08:43 +0000 (10:08 +0000)
In Skylake destructor we unmap the hardware address and then free
links and streams. The stream free accesses hardware to write to
registers and predictably causes oops.

So change the order and unmap last in destructor.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl.c

index 292d51db9a2219a2d2fc13ea74583841e97865a9..6e916c3c3a4babd1996dfeed941fc400d54f9ec6 100644 (file)
@@ -316,12 +316,13 @@ static int skl_free(struct hdac_ext_bus *ebus)
 
        if (bus->irq >= 0)
                free_irq(bus->irq, (void *)bus);
-       if (bus->remap_addr)
-               iounmap(bus->remap_addr);
-
        snd_hdac_bus_free_stream_pages(bus);
        snd_hdac_stream_free_all(ebus);
        snd_hdac_link_free_all(ebus);
+
+       if (bus->remap_addr)
+               iounmap(bus->remap_addr);
+
        pci_release_regions(skl->pci);
        pci_disable_device(skl->pci);