Commit 1a377a79 authored by Joel Stanley's avatar Joel Stanley Committed by Corey Minyard

ipmi: Fix ioremap error handling in bt-bmc

devm_ioremap_resource returns ERR_PTR so we can't check for NULL.
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Acked-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 54f9c4d0
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment