Commit 2a7fa90a authored by Wei Yongjun's avatar Wei Yongjun Committed by Jonathan Cameron

iio: ep93xx: 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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 56154dac
...@@ -167,10 +167,6 @@ static int ep93xx_adc_probe(struct platform_device *pdev) ...@@ -167,10 +167,6 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
priv = iio_priv(iiodev); priv = iio_priv(iiodev);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "Cannot obtain memory resource\n");
return -ENXIO;
}
priv->base = devm_ioremap_resource(&pdev->dev, res); priv->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->base)) { if (IS_ERR(priv->base)) {
dev_err(&pdev->dev, "Cannot map memory resource\n"); dev_err(&pdev->dev, "Cannot map memory resource\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment