Skip to content

Commit d94655b

Browse files
Wei Yongjuncminyard
authored andcommitted
ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
1 parent a3e6061 commit d94655b

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/char/ipmi/bt-bmc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
432432
dev_set_drvdata(&pdev->dev, bt_bmc);
433433

434434
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
435-
if (!res) {
436-
dev_err(dev, "Unable to find resources\n");
437-
return -ENXIO;
438-
}
439-
440435
bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
441436
if (IS_ERR(bt_bmc->base))
442437
return PTR_ERR(bt_bmc->base);

0 commit comments

Comments
 (0)