All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipmi: Fix ioremap error handling in bt-bmc
@ 2016-09-21 10:05 Joel Stanley
  2016-09-21 10:17 ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2016-09-21 10:05 UTC (permalink / raw)
  To: minyard; +Cc: openipmi-developer, linux-kernel, clg

devm_ioremap_resource returns ERR_PTR so we can't check for NULL.

Signed-off-by: Joel Stanley <joel@jms.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-21 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 10:05 [PATCH] ipmi: Fix ioremap error handling in bt-bmc Joel Stanley
2016-09-21 10:17 ` Cédric Le Goater
2016-09-21 16:34   ` Corey Minyard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.