]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: pxamci: fix the device-tree probe deferral path
authorRobert Jarzmik <robert.jarzmik@free.fr>
Mon, 8 Feb 2016 14:17:57 +0000 (15:17 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 8 Feb 2016 14:25:43 +0000 (15:25 +0100)
commitd2904519af852370546477c0e22876e3087deb59
tree9374660ccd72587a71252f3434d4c57f59626a5a
parent7a30563788f9944cede73bc8a2a4562be4619f3b
mmc: pxamci: fix the device-tree probe deferral path

When the gpio driver is probed after the mmc one, the read/write gpio
and card detection one return -EPROBE_DEFER. Unfortunately, the memory
region remains requested, and upon the next probe, the probe will fail
anyway with -EBUSY.

Fix this by releasing the memory resource upon probe failure.

More broadly, this patch uses devm_*() primitives whenever possible in
the probe function.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/pxamci.c