diff options
-rw-r--r-- | drivers/spi/spi-lp8841-rtc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-lp8841-rtc.c b/drivers/spi/spi-lp8841-rtc.c index 44bb69c3f1d6..faa577d282c0 100644 --- a/drivers/spi/spi-lp8841-rtc.c +++ b/drivers/spi/spi-lp8841-rtc.c | |||
@@ -217,8 +217,9 @@ spi_lp8841_rtc_probe(struct platform_device *pdev) | |||
217 | data = spi_master_get_devdata(master); | 217 | data = spi_master_get_devdata(master); |
218 | 218 | ||
219 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 219 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
220 | data->iomem = devm_ioremap_resource(&pdev->dev, iomem); | 220 | data->iomem = devm_ioremap_resource(&pdev->dev, iomem); |
221 | if (IS_ERR(data->iomem)) { | 221 | ret = PTR_ERR_OR_ZERO(data->iomem); |
222 | if (ret) { | ||
222 | dev_err(&pdev->dev, "failed to get IO address\n"); | 223 | dev_err(&pdev->dev, "failed to get IO address\n"); |
223 | goto err_put_master; | 224 | goto err_put_master; |
224 | } | 225 | } |