提交 a9c705a8 编写于 作者: F Fabio Estevam 提交者: Alexandre Belloni

rtc: mxc_v2: Remove unnecessary platform_get_resource() error check

devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 83c880f7
...@@ -296,9 +296,6 @@ static int mxc_rtc_probe(struct platform_device *pdev) ...@@ -296,9 +296,6 @@ static int mxc_rtc_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENODEV;
pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res); pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(pdata->ioaddr)) if (IS_ERR(pdata->ioaddr))
return PTR_ERR(pdata->ioaddr); return PTR_ERR(pdata->ioaddr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册