projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7413d1f
)
mmc: core: fix error path in mmc_host_alloc
author
Heiner Kallweit
<hkallweit1@gmail.com>
Sat, 28 Jan 2017 08:32:50 +0000
(09:32 +0100)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:20:48 +0000
(13:20 +0100)
Properly reverse everything if mmc_gpio_alloc(host) fails.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/host.c
b/drivers/mmc/core/host.c
index
1708818
..
3f8c85d
100644
(file)
--- a/
drivers/mmc/core/host.c
+++ b/
drivers/mmc/core/host.c
@@
-371,6
+371,8
@@
struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
if (mmc_gpio_alloc(host)) {
put_device(&host->class_dev);
+ ida_simple_remove(&mmc_host_ida, host->index);
+ kfree(host);
return NULL;
}