* [PATCH] pwm-puv3: Delete an error message for a failed memory allocation in pwm_probe()
@ 2017-12-15 17:33 ` SF Markus Elfring
0 siblings, 0 replies; 4+ messages in thread
From: SF Markus Elfring @ 2017-12-15 17:33 UTC (permalink / raw)
To: linux-pwm, Thierry Reding; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Dec 2017 18:29:49 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/pwm/pwm-puv3.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c
index ed6007b27585..754fd9a98f6b 100644
--- a/drivers/pwm/pwm-puv3.c
+++ b/drivers/pwm/pwm-puv3.c
@@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev)
int ret;
puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
- if (puv3 == NULL) {
- dev_err(&pdev->dev, "failed to allocate memory\n");
+ if (!puv3)
return -ENOMEM;
- }
puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK");
if (IS_ERR(puv3->clk))
--
2.15.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] pwm-puv3: Delete an error message for a failed memory allocation in pwm_probe()
@ 2017-12-15 17:33 ` SF Markus Elfring
0 siblings, 0 replies; 4+ messages in thread
From: SF Markus Elfring @ 2017-12-15 17:33 UTC (permalink / raw)
To: linux-pwm, Thierry Reding; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Dec 2017 18:29:49 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/pwm/pwm-puv3.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c
index ed6007b27585..754fd9a98f6b 100644
--- a/drivers/pwm/pwm-puv3.c
+++ b/drivers/pwm/pwm-puv3.c
@@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev)
int ret;
puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
- if (puv3 = NULL) {
- dev_err(&pdev->dev, "failed to allocate memory\n");
+ if (!puv3)
return -ENOMEM;
- }
puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK");
if (IS_ERR(puv3->clk))
--
2.15.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] pwm-puv3: Delete an error message for a failed memory allocation in pwm_probe()
2017-12-15 17:33 ` SF Markus Elfring
@ 2018-03-27 21:28 ` Thierry Reding
-1 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2018-03-27 21:28 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: linux-pwm, LKML, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Fri, Dec 15, 2017 at 06:33:49PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 15 Dec 2017 18:29:49 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/pwm/pwm-puv3.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pwm-puv3: Delete an error message for a failed memory allocation in pwm_probe()
@ 2018-03-27 21:28 ` Thierry Reding
0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2018-03-27 21:28 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: linux-pwm, LKML, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Fri, Dec 15, 2017 at 06:33:49PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 15 Dec 2017 18:29:49 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/pwm/pwm-puv3.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-27 21:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 17:33 [PATCH] pwm-puv3: Delete an error message for a failed memory allocation in pwm_probe() SF Markus Elfring
2017-12-15 17:33 ` SF Markus Elfring
2018-03-27 21:28 ` Thierry Reding
2018-03-27 21:28 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.