Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1387727 > unrolled thread

[PATCH] watchdog: remove error message when unable to allocate watchdog device

Started byColin King <colin.king@canonical.com>
First post2016-04-26 19:20 +0200
Last post2016-04-27 03:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: remove error message when unable to allocate watchdog device Colin King <colin.king@canonical.com> - 2016-04-26 19:20 +0200
    Re: [PATCH] watchdog: remove error message when unable to allocate  watchdog device Guenter Roeck <linux@roeck-us.net> - 2016-04-27 03:50 +0200

#1387727 — [PATCH] watchdog: remove error message when unable to allocate watchdog device

FromColin King <colin.king@canonical.com>
Date2016-04-26 19:20 +0200
Subject[PATCH] watchdog: remove error message when unable to allocate watchdog device
Message-ID<rseOu-2Z1-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1388584 — Re: [PATCH] watchdog: remove error message when unable to allocate watchdog device

FromGuenter Roeck <linux@roeck-us.net>
Date2016-04-27 03:50 +0200
SubjectRe: [PATCH] watchdog: remove error message when unable to allocate watchdog device
Message-ID<rsmM2-16B-5@gated-at.bofh.it>
In reply to#1387727
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;
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web