* [PATCH] pinctrl: tegra: Delete two error messages for a failed memory allocation in tegra_pinctrl_probe()
@ 2017-12-28 14:32 SF Markus Elfring
[not found] ` <0a67035f-e089-85f6-adff-14e41c957ab6-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-28 14:32 UTC (permalink / raw)
To: linux-gpio, linux-tegra, Jonathan Hunter, Laxman Dewangan,
Linus Walleij, Paul Gortmaker, Thierry Reding
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 28 Dec 2017 15:15:08 +0100
Omit extra messages 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/pinctrl/tegra/pinctrl-tegra.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 51716819129d..72c718e66ebb 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -666,10 +666,9 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
int fn, gn, gfn;
pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
- if (!pmx) {
- dev_err(&pdev->dev, "Can't alloc tegra_pmx\n");
+ if (!pmx)
return -ENOMEM;
- }
+
pmx->dev = &pdev->dev;
pmx->soc = soc_data;
@@ -722,10 +721,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
pmx->regs = devm_kzalloc(&pdev->dev, pmx->nbanks * sizeof(*pmx->regs),
GFP_KERNEL);
- if (!pmx->regs) {
- dev_err(&pdev->dev, "Can't alloc regs pointer\n");
+ if (!pmx->regs)
return -ENOMEM;
- }
for (i = 0; i < pmx->nbanks; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: tegra: Delete two error messages for a failed memory allocation in tegra_pinctrl_probe()
[not found] ` <0a67035f-e089-85f6-adff-14e41c957ab6-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
@ 2018-01-02 9:00 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-01-02 9:00 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Jonathan Hunter,
Laxman Dewangan, Paul Gortmaker, Thierry Reding, LKML,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Thu, Dec 28, 2017 at 3:32 PM, SF Markus Elfring
<elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> wrote:
> From: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> Date: Thu, 28 Dec 2017 15:15:08 +0100
>
> Omit extra messages for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-02 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 14:32 [PATCH] pinctrl: tegra: Delete two error messages for a failed memory allocation in tegra_pinctrl_probe() SF Markus Elfring
[not found] ` <0a67035f-e089-85f6-adff-14e41c957ab6-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2018-01-02 9:00 ` Linus Walleij
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).