watchdog: dw_wdt: Remove the un-necessary check after platform_get_resource()
devm_ioremap_resource() checks for valid resource. Remove the un-necessary check after platform_get_resource(). Signed-off-by: George Cherian <george.cherian@ti.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
c489d98c8c
commit
4bba08dda4
|
@ -296,9 +296,6 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
||||
if (!mem)
|
||||
return -EINVAL;
|
||||
|
||||
dw_wdt.regs = devm_ioremap_resource(&pdev->dev, mem);
|
||||
if (IS_ERR(dw_wdt.regs))
|
||||
return PTR_ERR(dw_wdt.regs);
|
||||
|
|
Loading…
Reference in a new issue