mmc: mediatek: fix mem leak in msdc_drv_probe
It should use mmc_free_host to free mem in error patch of msdc_drv_probe. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Liang <zhengliang6@huawei.com> Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com> Link: https://lore.kernel.org/r/20201112092530.32446-1-zhengliang6@huawei.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
ab07a13560
commit
bbba85fae4
@ -2504,8 +2504,10 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
||||
|
||||
host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
|
||||
"hrst");
|
||||
if (IS_ERR(host->reset))
|
||||
return PTR_ERR(host->reset);
|
||||
if (IS_ERR(host->reset)) {
|
||||
ret = PTR_ERR(host->reset);
|
||||
goto host_free;
|
||||
}
|
||||
|
||||
host->irq = platform_get_irq(pdev, 0);
|
||||
if (host->irq < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user