提交 48b332f9 编写于 作者: R Russell King 提交者: Chris Ball

mmc: omap_hsmmc: release correct resource

res can be one of several resources, as this variable is re-used several
times during probe.  This can cause the wrong resource parameters to be
passed to release_mem_region().

Get the original memory resource before calling release_mem_region().
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 ca5879d3
无相关合并请求
......@@ -2042,7 +2042,9 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
err_alloc:
omap_hsmmc_gpio_free(pdata);
err:
release_mem_region(res->start, resource_size(res));
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部