bcm2835-mmc: Fix DMA channel leak
authorLukas Wunner <lukas@wunner.de>
Wed, 16 Jan 2019 11:22:32 +0000 (12:22 +0100)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:23 +0000 (00:08 +0100)
commit98048595e04c161fdb9ef63b7b11900bd9cbe2a6
treecf9e4488b4591aa9f298eff8be72d030da1120b7
parent09fd81d1d65f21fe0e887d6da370230b6c05d909
bcm2835-mmc: Fix DMA channel leak

The BCM2835 MMC host driver requests a DMA channel on probe but neglects
to release the channel in the probe error path and on driver unbind.

I'm seeing this happen on every boot of the Compute Module 3: On first
driver probe, DMA channel 2 is allocated and then leaked with a "could
not get clk, deferring probe" message. On second driver probe, channel 4
is allocated.

Fix it.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Frank Pavlic <f.pavlic@kunbus.de>
drivers/mmc/host/bcm2835-mmc.c