提交 8af5fe3b 编写于 作者: A Axel Lin 提交者: Samuel Ortiz

mfd: properly handle platform_device_add_resources fail in mfd_add_device

platform_device_add_resources may fail, thus add error checking for it.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 25fe24f8
......@@ -70,7 +70,9 @@ static int mfd_add_device(struct device *parent, int id,
goto fail_res;
}
platform_device_add_resources(pdev, res, cell->num_resources);
ret = platform_device_add_resources(pdev, res, cell->num_resources);
if (ret)
goto fail_res;
ret = platform_device_add(pdev);
if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册