In case of ioremap failure, the core code will take care of printing the error message, so there is no need for having a local error message in the driver. Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx> --- drivers/staging/media/imx/imx7-media-csi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index 7abea8681062..fead72952aba 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -1194,10 +1194,8 @@ static int imx7_csi_probe(struct platform_device *pdev) } csi->regbase = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(csi->regbase)) { - dev_err(dev, "Failed platform resources map\n"); + if (IS_ERR(csi->regbase)) return PTR_ERR(csi->regbase); - } spin_lock_init(&csi->irqlock); mutex_init(&csi->lock); -- 2.17.1