summaryrefslogtreecommitdiff
path: root/drivers/watchdog/tqmx86_wdt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 10:22:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 10:22:00 +0300
commit83b21ed0fc2a7b17c6b9d4f72f664841f797380b (patch)
tree99272c0f69b8d762bf82400e6bdb84146b5baadb /drivers/watchdog/tqmx86_wdt.c
parentc3fee60908db4a8594f2e4a2131998384b8fa006 (diff)
parentf17b5f06cb92ef2250513a1e154c47b78df07d40 (diff)
downloadlinux-83b21ed0fc2a7b17c6b9d4f72f664841f797380b.tar.xz
Merge 5.0-rc4 into tty-next
We need the tty and serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/tqmx86_wdt.c')
-rw-r--r--drivers/watchdog/tqmx86_wdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/watchdog/tqmx86_wdt.c b/drivers/watchdog/tqmx86_wdt.c
index 0d3a0fbbd7a5..52941207a12a 100644
--- a/drivers/watchdog/tqmx86_wdt.c
+++ b/drivers/watchdog/tqmx86_wdt.c
@@ -79,13 +79,13 @@ static int tqmx86_wdt_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
- if (IS_ERR(res))
- return PTR_ERR(res);
+ if (!res)
+ return -ENODEV;
priv->io_base = devm_ioport_map(&pdev->dev, res->start,
resource_size(res));
- if (IS_ERR(priv->io_base))
- return PTR_ERR(priv->io_base);
+ if (!priv->io_base)
+ return -ENOMEM;
watchdog_set_drvdata(&priv->wdd, priv);