From: Fabio Estevam Date: Thu, 21 Dec 2017 11:43:24 +0000 (-0200) Subject: rtc: mxc_v2: Remove unnecessary platform_get_resource() error check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a9c705a8bd52d8a5205cc779d6e64af4321a9fa8;p=linux.git 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: Fabio Estevam Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c index b637095b0716e..eecc0cf9ee95f 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);