提交 487d499c 编写于 作者: B Belen Sarabia 提交者: Tejun Heo

Delete redundant return value check of platform_get_resource()

Delete error handling from the result of a call to platform_get_resource()
when the value is immediately passed to devm_ioremap_resource().
Signed-off-by: NBelen Sarabia <belensarabia@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 e3779f6a
......@@ -38,11 +38,6 @@ static int ahci_octeon_probe(struct platform_device *pdev)
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "Platform resource[0] is missing\n");
return -ENODEV;
}
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册