From: Julia Lawall <julia.lawall@lip6.fr>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Support Opensource <Support.Opensource@diasemi.com>,
LKML <linux-kernel@vger.kernel.org>,
Takashi Iwai <tiwai@suse.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
SF Markus Elfring <elfring@users.sourceforge.net>
Subject: RE: [PATCH 1/2] ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to
Date: Fri, 24 Nov 2017 11:33:04 +0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1711241231560.3316@hadrien> (raw)
In-Reply-To: <2E89032DDAA8B9408CB92943514A0337014C1B116F@SW-EX-MBX01.diasemi.com>
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]
On Fri, 24 Nov 2017, Adam Thomson wrote:
> On 23 November 2017 17:33, SF Markus Elfring wrote:
>
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Thu, 23 Nov 2017 17:56:54 +0100
> >
> > Omit an extra message for a memory allocation failure in this function.
>
> I'm not sure this is an extra message. We don't return -ENOMEM as a result of
> this operation and probe won't fail on this. So does devm_kzalloc() print error
> messages?
Unless there is NO WARN, a backtrace will be generated in the out of
memory case.
julia
>
> > This issue was detected by using the Coccinelle software.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > ---
> > sound/soc/codecs/da7213.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
> > index 41d9b1da27c2..d1b77a0e3b74 100644
> > --- a/sound/soc/codecs/da7213.c
> > +++ b/sound/soc/codecs/da7213.c
> > @@ -1654,10 +1654,8 @@ static struct da7213_platform_data
> > u32 fw_val32;
> >
> > pdata = devm_kzalloc(codec->dev, sizeof(*pdata), GFP_KERNEL);
> > - if (!pdata) {
> > - dev_warn(codec->dev, "Failed to allocate memory for pdata\n");
> > + if (!pdata)
> > return NULL;
> > - }
> >
> > if (device_property_read_u32(dev, "dlg,micbias1-lvl", &fw_val32) >= 0)
> > pdata->micbias1_lvl = da7213_of_micbias_lvl(codec, fw_val32);
> > --
> > 2.15.0
> N?????r??y??????X??ǧv???){.n?????z?ޖ6?????)?????*\x1fjg???\x1e?????ݢj/???z?ޖ????ޙ????&?)ߡ?a???????G?????\x0f??:+v???w????
next prev parent reply other threads:[~2017-11-24 11:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 17:30 [PATCH 0/2] ASoC: da7213: Adjustments for two function implementations SF Markus Elfring
2017-11-23 17:32 ` [PATCH 1/2] ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to_pda SF Markus Elfring
2017-11-24 11:22 ` [PATCH 1/2] ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to Adam Thomson
2017-11-24 11:33 ` Julia Lawall [this message]
2017-11-24 11:43 ` Adam Thomson
2017-11-27 18:53 ` Applied "ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to_pdata( Mark Brown
2017-11-23 17:33 ` [PATCH 2/2] ASoC: da7213: Improve a size determination in da7213_i2c_probe() SF Markus Elfring
2017-11-24 11:49 ` Adam Thomson
2017-11-27 18:53 ` Applied "ASoC: da7213: Improve a size determination in da7213_i2c_probe()" to the asoc tree Mark Brown
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=alpine.DEB.2.20.1711241231560.3316@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=Support.Opensource@diasemi.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.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