From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-i2c@vger.kernel.org, Peter Rosin <peda@axentia.se>,
Wolfram Sang <wsa@the-dreams.de>,
York Sun <yorksun@freescale.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt()
Date: Thu, 1 Feb 2018 17:46:25 +0100 [thread overview]
Message-ID: <7b0fcef4-d0b2-e12d-c369-ac6704e16a09@nokia.com> (raw)
In-Reply-To: <224a8918-f882-9ab1-218c-83df93d4cb2f@users.sourceforge.net>
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.
next prev parent reply other threads:[~2018-02-01 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-05-24 12:00 ` Peter Rosin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b0fcef4-d0b2-e12d-c369-ac6704e16a09@nokia.com \
--to=alexander.sverdlin@nokia.com \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=wsa@the-dreams.de \
--cc=yorksun@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).