summaryrefslogtreecommitdiff
path: root/drivers/watchdog/pic32-wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/pic32-wdt.c')
-rw-r--r--drivers/watchdog/pic32-wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/pic32-wdt.c b/drivers/watchdog/pic32-wdt.c
index 6047aa89a4d3..2b7a2b22fcb2 100644
--- a/drivers/watchdog/pic32-wdt.c
+++ b/drivers/watchdog/pic32-wdt.c
@@ -174,8 +174,8 @@ static int pic32_wdt_drv_probe(struct platform_device *pdev)
struct resource *mem;
wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL);
- if (IS_ERR(wdt))
- return PTR_ERR(wdt);
+ if (!wdt)
+ return -ENOMEM;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
wdt->regs = devm_ioremap_resource(&pdev->dev, mem);