* [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt(
@ 2018-02-01 16:24 SF Markus Elfring
2018-02-01 16:46 ` [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe Alexander Sverdlin
2018-05-24 12:00 ` Peter Rosin
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2018-02-01 16:24 UTC (permalink / raw)
To: linux-i2c, Peter Rosin, Wolfram Sang, York Sun
Cc: LKML, kernel-janitors, Alexander Sverdlin
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Feb 2018 17:17:19 +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/i2c/muxes/i2c-mux-reg.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
index c948e5a4cb04..f624ed64a47b 100644
--- a/drivers/i2c/muxes/i2c-mux-reg.c
+++ b/drivers/i2c/muxes/i2c-mux-reg.c
@@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
values = devm_kzalloc(&pdev->dev,
sizeof(*mux->data.values) * mux->data.n_values,
GFP_KERNEL);
- if (!values) {
- dev_err(&pdev->dev, "Cannot allocate values array");
+ if (!values)
return -ENOMEM;
- }
for_each_child_of_node(np, child) {
of_property_read_u32(child, "reg", values + i);
--
2.16.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe
2018-02-01 16:24 [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt( SF Markus Elfring
@ 2018-02-01 16:46 ` Alexander Sverdlin
2018-05-24 12:00 ` Peter Rosin
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Sverdlin @ 2018-02-01 16:46 UTC (permalink / raw)
To: SF Markus Elfring, linux-i2c, Peter Rosin, Wolfram Sang, York Sun
Cc: LKML, kernel-janitors
On 01/02/18 17:24, SF Markus Elfring wrote:
> 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>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> ---
> drivers/i2c/muxes/i2c-mux-reg.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
> index c948e5a4cb04..f624ed64a47b 100644
> --- a/drivers/i2c/muxes/i2c-mux-reg.c
> +++ b/drivers/i2c/muxes/i2c-mux-reg.c
> @@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
> values = devm_kzalloc(&pdev->dev,
> sizeof(*mux->data.values) * mux->data.n_values,
> GFP_KERNEL);
> - if (!values) {
> - dev_err(&pdev->dev, "Cannot allocate values array");
> + if (!values)
> return -ENOMEM;
> - }
>
> for_each_child_of_node(np, child) {
> of_property_read_u32(child, "reg", values + i);
--
Best regards,
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe
2018-02-01 16:24 [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt( SF Markus Elfring
2018-02-01 16:46 ` [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe Alexander Sverdlin
@ 2018-05-24 12:00 ` Peter Rosin
1 sibling, 0 replies; 3+ messages in thread
From: Peter Rosin @ 2018-05-24 12:00 UTC (permalink / raw)
To: SF Markus Elfring, linux-i2c, Wolfram Sang, York Sun
Cc: LKML, kernel-janitors, Alexander Sverdlin
On 2018-02-01 17:24, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 1 Feb 2018 17:17:19 +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>
Applied to i2c-mux/for-next with a shortened subject.
Cheers,
Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-24 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 16:24 [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt( SF Markus Elfring
2018-02-01 16:46 ` [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe Alexander Sverdlin
2018-05-24 12:00 ` Peter Rosin
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).