linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memory: tegra20-emc: Remove unnecessary print function dev_err()
@ 2021-11-16  1:39 Xu Wang
  2021-11-16  9:05 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2021-11-16  1:39 UTC (permalink / raw)
  To: krzysztof.kozlowski, thierry.reding, jonathanh, digetx,
	dan.carpenter, cw00.choi, viresh.kumar
  Cc: linux-kernel, linux-tegra

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/memory/tegra/tegra20-emc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
index 497b6edbf3ca..b2107d16570e 100644
--- a/drivers/memory/tegra/tegra20-emc.c
+++ b/drivers/memory/tegra/tegra20-emc.c
@@ -1207,10 +1207,8 @@ static int tegra_emc_probe(struct platform_device *pdev)
 	int irq, err;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "please update your device tree\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	emc = devm_kzalloc(&pdev->dev, sizeof(*emc), GFP_KERNEL);
 	if (!emc)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] memory: tegra20-emc: Remove unnecessary print function dev_err()
  2021-11-16  1:39 [PATCH] memory: tegra20-emc: Remove unnecessary print function dev_err() Xu Wang
@ 2021-11-16  9:05 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-11-16  9:05 UTC (permalink / raw)
  To: Xu Wang, thierry.reding, jonathanh, digetx, dan.carpenter,
	cw00.choi, viresh.kumar
  Cc: linux-kernel, linux-tegra

On 16/11/2021 02:39, Xu Wang wrote:
> The print function dev_err() is redundant because
> platform_get_irq() already prints an error.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/memory/tegra/tegra20-emc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
> index 497b6edbf3ca..b2107d16570e 100644
> --- a/drivers/memory/tegra/tegra20-emc.c
> +++ b/drivers/memory/tegra/tegra20-emc.c
> @@ -1207,10 +1207,8 @@ static int tegra_emc_probe(struct platform_device *pdev)
>  	int irq, err;
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(&pdev->dev, "please update your device tree\n");
> +	if (irq < 0)
>  		return irq;
> -	}

No, it's not redundant because it is a different error message.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-16  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  1:39 [PATCH] memory: tegra20-emc: Remove unnecessary print function dev_err() Xu Wang
2021-11-16  9:05 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).