Skip to content

Commit 1a377a7

Browse files
shenkicminyard
authored andcommitted
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>
1 parent 54f9c4d commit 1a377a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/char/ipmi/bt-bmc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ static int bt_bmc_probe(struct platform_device *pdev)
438438
}
439439

440440
bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
441-
if (!bt_bmc->base)
442-
return -ENOMEM;
441+
if (IS_ERR(bt_bmc->base))
442+
return PTR_ERR(bt_bmc->base);
443443

444444
mutex_init(&bt_bmc->mutex);
445445
init_waitqueue_head(&bt_bmc->queue);

0 commit comments

Comments
 (0)