diff mbox

[-next] crypto: stm32 - remove redundant dev_err call in stm32_cryp_probe()

Message ID 1516189224-11877-1-git-send-email-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Wei Yongjun Jan. 17, 2018, 11:40 a.m. UTC
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/crypto/stm32/stm32-cryp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Fabien DESSENNE Jan. 17, 2018, 1:02 p.m. UTC | #1
Hi,


Thank you for the patch.


On 17/01/18 12:40, Wei Yongjun wrote:
> There is a error message within devm_ioremap_resource

> already, so remove the dev_err call to avoid redundant

> error message.

>

> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>

> ---

>   drivers/crypto/stm32/stm32-cryp.c | 4 +---

>   1 file changed, 1 insertion(+), 3 deletions(-)

>

> diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c

> index cf1dddb..4a06a7a 100644

> --- a/drivers/crypto/stm32/stm32-cryp.c

> +++ b/drivers/crypto/stm32/stm32-cryp.c

> @@ -1052,10 +1052,8 @@ static int stm32_cryp_probe(struct platform_device *pdev)

>   

>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

>   	cryp->regs = devm_ioremap_resource(dev, res);

> -	if (IS_ERR(cryp->regs)) {

> -		dev_err(dev, "Cannot map CRYP IO\n");

> +	if (IS_ERR(cryp->regs))

>   		return PTR_ERR(cryp->regs);

> -	}

>   

>   	irq = platform_get_irq(pdev, 0);

>   	if (irq < 0) {

>
Herbert Xu Jan. 26, 2018, 3:45 p.m. UTC | #2
On Wed, Jan 17, 2018 at 11:40:24AM +0000, Wei Yongjun wrote:
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch applied.  Thanks.
diff mbox

Patch

diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c
index cf1dddb..4a06a7a 100644
--- a/drivers/crypto/stm32/stm32-cryp.c
+++ b/drivers/crypto/stm32/stm32-cryp.c
@@ -1052,10 +1052,8 @@  static int stm32_cryp_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	cryp->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(cryp->regs)) {
-		dev_err(dev, "Cannot map CRYP IO\n");
+	if (IS_ERR(cryp->regs))
 		return PTR_ERR(cryp->regs);
-	}
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {