]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: bcm2835: Fix DMA channel leak on probe error
authorLukas Wunner <lukas@wunner.de>
Sat, 19 Jan 2019 15:31:00 +0000 (16:31 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 28 Jan 2019 11:43:19 +0000 (12:43 +0100)
commitf759007c3c938b0a0375bfdef8566225789a8da2
tree65f7ee4ffcee8d26a354f203cffbb677c01eb67b
parentbef19531c51083c8c9366cbaaf42eab91e2932f0
mmc: bcm2835: Fix DMA channel leak on probe error

The BCM2835 MMC host driver requests a DMA channel on probe but neglects
to release the channel in the probe error path.  The channel may
therefore be leaked, in particular if devm_clk_get() causes probe
deferral.  Fix it.

Fixes: 3c526e49d652 ("mmc: bcm2835: Add new driver for the sdhost controller.")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: stable@vger.kernel.org # v4.12+
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/bcm2835.c