projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.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
|
blame
|
history
diff --git
a/drivers/mmc/core/host.c
b/drivers/mmc/core/host.c
index 1708818549752fe2dcb3f52e704e6651636e0767..3f8c85d5aa094b43666904c7dbbe5e62c9763c19 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;
}