1 From 2e2f57e09e1ace18ae01a87d9fc4378c96c54370 Mon Sep 17 00:00:00 2001
2 From: Lukas Wunner <lukas@wunner.de>
3 Date: Tue, 22 Jan 2019 12:29:45 +0100
4 Subject: [PATCH] bcm2835-mmc: Handle mmc_add_host() errors
6 The BCM2835 MMC host driver calls mmc_add_host() but doesn't check its
7 return value. Errors occurring in that function are therefore not
10 Signed-off-by: Lukas Wunner <lukas@wunner.de>
11 Cc: Frank Pavlic <f.pavlic@kunbus.de>
13 drivers/mmc/host/bcm2835-mmc.c | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
16 --- a/drivers/mmc/host/bcm2835-mmc.c
17 +++ b/drivers/mmc/host/bcm2835-mmc.c
18 @@ -1398,10 +1398,16 @@ static int bcm2835_mmc_add_host(struct b
23 + ret = mmc_add_host(mmc);
25 + dev_err(dev, "could not add MMC host\n");
32 + free_irq(host->irq, host);
34 tasklet_kill(&host->finish_tasklet);