Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);