linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: remove error message when unable to allocate watchdog device
@ 2016-04-26 17:18 Colin King
  2016-04-27  1:41 ` Guenter Roeck
  2016-05-14 18:33 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-04-26 17:18 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, linux-watchdog, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The dev_err message is superfluous because the failure is already
printed by dev_kzalloc, so remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/watchdog/jz4740_wdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
index 6a7d5c3..c8d51dd 100644
--- a/drivers/watchdog/jz4740_wdt.c
+++ b/drivers/watchdog/jz4740_wdt.c
@@ -160,10 +160,8 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
 
 	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct jz4740_wdt_drvdata),
 			       GFP_KERNEL);
-	if (!drvdata) {
-		dev_err(&pdev->dev, "Unable to alloacate watchdog device\n");
+	if (!drvdata)
 		return -ENOMEM;
-	}
 
 	if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
 		heartbeat = DEFAULT_HEARTBEAT;
-- 
2.7.4

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

* Re: [PATCH] watchdog: remove error message when unable to allocate watchdog device
  2016-04-26 17:18 [PATCH] watchdog: remove error message when unable to allocate watchdog device Colin King
@ 2016-04-27  1:41 ` Guenter Roeck
  2016-05-14 18:33 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-04-27  1:41 UTC (permalink / raw)
  To: Colin King, Wim Van Sebroeck, linux-watchdog, linux-kernel

On 04/26/2016 10:18 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The dev_err message is superfluous because the failure is already
> printed by dev_kzalloc, so remove it.
>
Nitpick: devm_kzalloc

> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Thanks,
Guenter

> ---
>   drivers/watchdog/jz4740_wdt.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
> index 6a7d5c3..c8d51dd 100644
> --- a/drivers/watchdog/jz4740_wdt.c
> +++ b/drivers/watchdog/jz4740_wdt.c
> @@ -160,10 +160,8 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
>
>   	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct jz4740_wdt_drvdata),
>   			       GFP_KERNEL);
> -	if (!drvdata) {
> -		dev_err(&pdev->dev, "Unable to alloacate watchdog device\n");
> +	if (!drvdata)
>   		return -ENOMEM;
> -	}
>
>   	if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
>   		heartbeat = DEFAULT_HEARTBEAT;
>

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

* Re: [PATCH] watchdog: remove error message when unable to allocate watchdog device
  2016-04-26 17:18 [PATCH] watchdog: remove error message when unable to allocate watchdog device Colin King
  2016-04-27  1:41 ` Guenter Roeck
@ 2016-05-14 18:33 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2016-05-14 18:33 UTC (permalink / raw)
  To: Colin King; +Cc: Guenter Roeck, linux-watchdog, linux-kernel

Hi Colin,

> From: Colin Ian King <colin.king@canonical.com>
> 
> The dev_err message is superfluous because the failure is already
> printed by dev_kzalloc, so remove it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/watchdog/jz4740_wdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
> index 6a7d5c3..c8d51dd 100644
> --- a/drivers/watchdog/jz4740_wdt.c
> +++ b/drivers/watchdog/jz4740_wdt.c
> @@ -160,10 +160,8 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
>  
>  	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct jz4740_wdt_drvdata),
>  			       GFP_KERNEL);
> -	if (!drvdata) {
> -		dev_err(&pdev->dev, "Unable to alloacate watchdog device\n");
> +	if (!drvdata)
>  		return -ENOMEM;
> -	}
>  
>  	if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
>  		heartbeat = DEFAULT_HEARTBEAT;
> -- 
> 2.7.4
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.

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

end of thread, other threads:[~2016-05-14 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 17:18 [PATCH] watchdog: remove error message when unable to allocate watchdog device Colin King
2016-04-27  1:41 ` Guenter Roeck
2016-05-14 18:33 ` Wim Van Sebroeck

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