Skip to contentSkip to conversation

bus: da850-mstpri: remove redundant dev_err call in da8xx_mstpri_probe()

PATCH In review Wei Yongjun 2 participants 2 messages Feb 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bus: da850-mstpri: remove redundant dev_err call in da8xx_mstpri_probe()

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/bus/da8xx-mstpri.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bus/da8xx-mstpri.c +1 -3
index 9af9bcc..5595af1 100644
@@ -218,10 +218,8 @@ static int da8xx_mstpri_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	mstpri = devm_ioremap_resource(dev, res);
-	if (IS_ERR(mstpri)) {
-		dev_err(dev, "unable to map MSTPRI registers\n");
+	if (IS_ERR(mstpri))
 		return PTR_ERR(mstpri);
-	}
 
 	prio_list = da8xx_mstpri_get_board_prio();
 	if (!prio_list) {
Acked-by on v1 1/1
#1 lore raw

2017-02-09 16:30 GMT+01:00 Wei Yongjun <[email protected]>:

Quoted 20 lines

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/bus/da8xx-mstpri.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bus/da8xx-mstpri.c +0 -0
index 9af9bcc..5595af1 100644
@@ -218,10 +218,8 @@ static int da8xx_mstpri_probe(struct platform_device *pdev)
 

drivers/bus/da8xx-mstpri.c static int da8xx_mstpri_probe(struct platform_device *pdev) · line 225

Quoted 10 lines
drivers/bus/da8xx-mstpri.c +1 -3
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        mstpri = devm_ioremap_resource(dev, res);
-       if (IS_ERR(mstpri)) {
-               dev_err(dev, "unable to map MSTPRI registers\n");
+       if (IS_ERR(mstpri))
                return PTR_ERR(mstpri);
-       }
 
        prio_list = da8xx_mstpri_get_board_prio();
        if (!prio_list) {