summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2016-09-21 19:35:53 +0930
committerCorey Minyard <cminyard@mvista.com>2016-09-29 19:05:06 -0500
commit1a377a79211a08c5c8a05c0b6dee6d5b13ef4107 (patch)
treed16340a09b16def477699549642afb50181701fc /drivers/char/ipmi
parent54f9c4d0778b3f9ab791b1b7eb1a5d2809f02f50 (diff)
downloadlinux-1a377a79211a08c5c8a05c0b6dee6d5b13ef4107.tar.bz2
ipmi: Fix ioremap error handling in bt-bmc
devm_ioremap_resource returns ERR_PTR so we can't check for NULL. Signed-off-by: Joel Stanley <joel@jms.id.au> Acked-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/bt-bmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 2e880bf0be26..de64bf1f2f4d 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -438,8 +438,8 @@ static int bt_bmc_probe(struct platform_device *pdev)
}
bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
- if (!bt_bmc->base)
- return -ENOMEM;
+ if (IS_ERR(bt_bmc->base))
+ return PTR_ERR(bt_bmc->base);
mutex_init(&bt_bmc->mutex);
init_waitqueue_head(&bt_bmc->queue);