projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3aa8b8b
)
watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs
author
Dan Carpenter
<
[email protected]
>
Fri, 4 Jan 2019 06:47:25 +0000
(09:47 +0300)
committer
Wim Van Sebroeck
<
[email protected]
>
Mon, 7 Jan 2019 09:10:35 +0000
(10:10 +0100)
These functions return NULL on error but we accidentally check
for IS_ERR() instead.
Fixes: e3c21e088f89 ("watchdog: tqmx86: Add watchdog driver for the IO controller")
Signed-off-by: Dan Carpenter <
[email protected]
>
Reviewed-by: Andrew Lunn <
[email protected]
>
Reviewed-by: Guenter Roeck <
[email protected]
>
Signed-off-by: Guenter Roeck <
[email protected]
>
Signed-off-by: Wim Van Sebroeck <
[email protected]
>
drivers/watchdog/tqmx86_wdt.c
patch
|
blob
|
history
diff --git
a/drivers/watchdog/tqmx86_wdt.c
b/drivers/watchdog/tqmx86_wdt.c
index 0d3a0fbbd7a5ddfcedc59a1ce16ec22b8830fba7..52941207a12aba71ea1694b23c1c5765d3a56b8b 100644
(file)
--- 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);