Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640911 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-05-13 15:20 +0200 |
| Last post | 2017-05-19 10:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mmc: atmel-mci: Delete an error message for a failed memory allocation in atmci_of_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-13 15:20 +0200
Re: [PATCH] mmc: atmel-mci: Delete an error message for a failed memory allocation in atmci_of_init() Ulf Hansson <ulf.hansson@linaro.org> - 2017-05-19 10:40 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-13 15:20 +0200 |
| Subject | [PATCH] mmc: atmel-mci: Delete an error message for a failed memory allocation in atmci_of_init() |
| Message-ID | <tGF7H-48W-11@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 May 2017 15:05:28 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/mmc/host/atmel-mci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 388e4a3f13e6..584247464eb8 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -667,10 +667,8 @@ atmci_of_init(struct platform_device *pdev)
}
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(&pdev->dev, "could not allocate memory for pdata\n");
+ if (!pdata)
return ERR_PTR(-ENOMEM);
- }
for_each_child_of_node(np, cnp) {
if (of_property_read_u32(cnp, "reg", &slot_id)) {
--
2.12.3
[toc] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2017-05-19 10:40 +0200 |
| Subject | Re: [PATCH] mmc: atmel-mci: Delete an error message for a failed memory allocation in atmci_of_init() |
| Message-ID | <tILC2-7Vr-3@gated-at.bofh.it> |
| In reply to | #1640911 |
On 13 May 2017 at 15:17, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 13 May 2017 15:05:28 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Thanks applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/atmel-mci.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 388e4a3f13e6..584247464eb8 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -667,10 +667,8 @@ atmci_of_init(struct platform_device *pdev)
> }
>
> pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> - if (!pdata) {
> - dev_err(&pdev->dev, "could not allocate memory for pdata\n");
> + if (!pdata)
> return ERR_PTR(-ENOMEM);
> - }
>
> for_each_child_of_node(np, cnp) {
> if (of_property_read_u32(cnp, "reg", &slot_id)) {
> --
> 2.12.3
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web