Skip to content

Commit 2e9c079

Browse files
Wei Yongjunbroonie
authored andcommitted
spi: omap2-mcspi: 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> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent af9e53f commit 2e9c079

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎drivers/spi/spi-omap2-mcspi.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,11 +1386,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
13861386
regs_offset = pdata->regs_offset;
13871387

13881388
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1389-
if (r == NULL) {
1390-
status = -ENODEV;
1391-
goto free_master;
1392-
}
1393-
13941389
mcspi->base = devm_ioremap_resource(&pdev->dev, r);
13951390
if (IS_ERR(mcspi->base)) {
13961391
status = PTR_ERR(mcspi->base);

0 commit comments

Comments
 (0)