@@ -1077,20 +1077,14 @@ static int ep93xx_spi_probe(struct platform_device *pdev)
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "unable to get iomem resource\n");
- error = -ENODEV;
- goto fail_put_clock;
- }
-
- espi->sspdr_phys = res->start + SSPDR;
-
espi->regs_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(espi->regs_base)) {
error = PTR_ERR(espi->regs_base);
goto fail_put_clock;
}
+ espi->sspdr_phys = res->start + SSPDR;
+
error = devm_request_irq(&pdev->dev, irq, ep93xx_spi_interrupt,
0, "ep93xx-spi", espi);
if (error) {
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> --- drivers/spi/spi-ep93xx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)