提交 37f15291 编写于 作者: G George Cherian 提交者: Wim Van Sebroeck

watchdog: lantiq_wdt: Remove the un-necessary check of resource after platform_get_resource()

devm_ioremap_resource() checks for valid resource.
Remove the un-necessary check after platform_get_resource().
Signed-off-by: NGeorge Cherian <george.cherian@ti.com>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 4bba08dd
...@@ -192,11 +192,6 @@ ltq_wdt_probe(struct platform_device *pdev) ...@@ -192,11 +192,6 @@ ltq_wdt_probe(struct platform_device *pdev)
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct clk *clk; struct clk *clk;
if (!res) {
dev_err(&pdev->dev, "cannot obtain I/O memory region");
return -ENOENT;
}
ltq_wdt_membase = devm_ioremap_resource(&pdev->dev, res); ltq_wdt_membase = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ltq_wdt_membase)) if (IS_ERR(ltq_wdt_membase))
return PTR_ERR(ltq_wdt_membase); return PTR_ERR(ltq_wdt_membase);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册