diff mbox series

rtc: mxc_v2: Remove unnecessary platform_get_resource() error check

Message ID 20171221114324.6935-1-fabio.estevam@nxp.com
State Accepted
Headers show
Series rtc: mxc_v2: Remove unnecessary platform_get_resource() error check | expand

Commit Message

Fabio Estevam Dec. 21, 2017, 11:43 a.m. UTC
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/rtc/rtc-mxc_v2.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Alexandre Belloni Jan. 11, 2018, 11:12 p.m. UTC | #1
On 21/12/2017 at 09:43:24 -0200, Fabio Estevam wrote:
> devm_ioremap_resource() already checks if the resource is NULL, so
> remove the unnecessary platform_get_resource() error check.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  drivers/rtc/rtc-mxc_v2.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
index b637095b0716..eecc0cf9ee95 100644
--- a/drivers/rtc/rtc-mxc_v2.c
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -296,9 +296,6 @@  static int mxc_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(pdata->ioaddr))
 		return PTR_ERR(pdata->ioaddr);