linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] thermal: ti-soc-thermal: Remove dev_err() on platform_get_irq() failure
@ 2019-11-02  7:56 YueHaibing
  2019-11-05  6:08 ` Keerthy
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-11-02  7:56 UTC (permalink / raw)
  To: edubezval, j-keerthy, rui.zhang, daniel.lezcano, amit.kucheria
  Cc: linux-pm, linux-omap, linux-kernel, YueHaibing

platform_get_irq() will call dev_err() itself on failure,
so there is no need for the driver to also do this.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/thermal/ti-soc-thermal/ti-bandgap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 2fa78f7..89c3ba7 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -787,10 +787,9 @@ static int ti_bandgap_talert_init(struct ti_bandgap *bgp,
 	int ret;
 
 	bgp->irq = platform_get_irq(pdev, 0);
-	if (bgp->irq < 0) {
-		dev_err(&pdev->dev, "get_irq failed\n");
+	if (bgp->irq < 0)
 		return bgp->irq;
-	}
+
 	ret = request_threaded_irq(bgp->irq, NULL,
 				   ti_bandgap_talert_irq_handler,
 				   IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
-- 
2.7.4



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

* Re: [PATCH -next] thermal: ti-soc-thermal: Remove dev_err() on platform_get_irq() failure
  2019-11-02  7:56 [PATCH -next] thermal: ti-soc-thermal: Remove dev_err() on platform_get_irq() failure YueHaibing
@ 2019-11-05  6:08 ` Keerthy
  0 siblings, 0 replies; 2+ messages in thread
From: Keerthy @ 2019-11-05  6:08 UTC (permalink / raw)
  To: YueHaibing, edubezval, rui.zhang, daniel.lezcano, amit.kucheria
  Cc: linux-pm, linux-omap, linux-kernel



On 02/11/19 1:26 PM, YueHaibing wrote:
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.

Acked-by: Keerthy <j-keerthy@ti.com>

> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/thermal/ti-soc-thermal/ti-bandgap.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> index 2fa78f7..89c3ba7 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> @@ -787,10 +787,9 @@ static int ti_bandgap_talert_init(struct ti_bandgap *bgp,
>   	int ret;
>   
>   	bgp->irq = platform_get_irq(pdev, 0);
> -	if (bgp->irq < 0) {
> -		dev_err(&pdev->dev, "get_irq failed\n");
> +	if (bgp->irq < 0)
>   		return bgp->irq;
> -	}
> +
>   	ret = request_threaded_irq(bgp->irq, NULL,
>   				   ti_bandgap_talert_irq_handler,
>   				   IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> 

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

end of thread, other threads:[~2019-11-05  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02  7:56 [PATCH -next] thermal: ti-soc-thermal: Remove dev_err() on platform_get_irq() failure YueHaibing
2019-11-05  6:08 ` Keerthy

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).