mmc: sdhci-s3c: fix potential NULL dereference
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>
This commit is contained in:
parent
a3c76eb9d4
commit
326adda53a
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue