projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c76eb
)
mmc: sdhci-s3c: fix potential NULL dereference
author
Jaehoon Chung
<jh80.chung@samsung.com>
Wed, 12 Oct 2011 04:14:29 +0000
(13:14 +0900)
committer
Chris Ball
<cjb@laptop.org>
Wed, 26 Oct 2011 20:32:22 +0000
(16:32 -0400)
sc->clk_bus[ptr] could be NULL.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-s3c.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mmc/host/sdhci-s3c.c
b/drivers/mmc/host/sdhci-s3c.c
index 82709b6da8614d0f72b49e6049a9632b95af185d..3d00e722efc9cec34e9cbdd1807863326f58e828 100644
(file)
--- a/
drivers/mmc/host/sdhci-s3c.c
+++ b/
drivers/mmc/host/sdhci-s3c.c
@@
-567,8
+567,10
@@
static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
err_req_regs:
for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
- clk_disable(sc->clk_bus[ptr]);
- clk_put(sc->clk_bus[ptr]);
+ if (sc->clk_bus[ptr]) {
+ clk_disable(sc->clk_bus[ptr]);
+ clk_put(sc->clk_bus[ptr]);
+ }
}
err_no_busclks: