summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2012-07-11 17:51:40 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-07-31 12:06:26 +0100
commit04e8c7bc2c1eda2d06ff6eb57a7df97e64d895e6 (patch)
treefb2aff6eff80f234c05b3d435cff09aed7eccd0e /drivers/mmc
parent4e1755bbb4857ea4c5a5e12927cbc04e843cb4d4 (diff)
ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel request fails
If dma_request_channel() fails (e.g. because DMA enine is not built into the kernel), the return value from probe is zero causing the driver to be bound to the device even though probe failed. To fix, ensure that probe returns an error value when a DMA channel request fail. Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2338703746a..823d21cb87c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1924,12 +1924,14 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &rx_req);
if (!host->rx_chan) {
dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
+ ret = -ENXIO;
goto err_irq;
}
host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req);
if (!host->tx_chan) {
dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
+ ret = -ENXIO;
goto err_irq;
}