mmc: sdhci-s3c: fix wrong error-control
Subsystems (3)
Jaehoon Chung
maintainerPATCH RESEND 1/1 mmc: sdhci-s3c: fix wrong error-control
If sc->clk_bus[ptr] is NULL, happen NULL pointer error.
Signed-off-by Jaehoon Chung <[email protected]>
Signed-off-by Kyungmin Park <[email protected]>
--- drivers/mmc/host/sdhci-s3c.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-s3c.c +4 -2
@@ -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:
Signature · 1 line
1.7.4.1
Hi,
Quoted 15 lines · Jaehoon Chung
If sc->clk_bus[ptr] is NULL, happen NULL pointer error.
Signed-off-by Jaehoon Chung <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/mmc/host/sdhci-s3c.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci-s3c.c +0
-0@@ -567,8 +567,10 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) err_req_regs:
drivers/mmc/host/sdhci-s3c.c static int __devinit sdhci_s3c_probe(struct platform_device *pdev) · line 576
Quoted 10 lines
drivers/mmc/host/sdhci-s3c.c +4
-2for (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:
Thanks, pushed to mmc-next for 3.2.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child