[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160921100553.16314-1-joel@jms.id.au>
Date: Wed, 21 Sep 2016 19:35:53 +0930
From: Joel Stanley <joel@....id.au>
To: minyard@....org
Cc: openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, clg@...d.org
Subject: [PATCH] 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@....id.au>
---
drivers/char/ipmi/bt-bmc.c | 4 ++--
1 file 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);
--
2.9.3
Powered by blists - more mailing lists