From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 1/9] ASoC: ab8500: Add missing of NULL check of devm_kzalloc()
Date: Wed, 30 Oct 2013 08:34:59 +0100 [thread overview]
Message-ID: <1383118507-21503-2-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1383118507-21503-1-git-send-email-tiwai@suse.de>
Spotted by coverity CID 712316.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/ab8500-codec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index a0394a8f2257..6e3dda1ca734 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2575,6 +2575,8 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev)
/* Create driver private-data struct */
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata),
GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
drvdata->sid_status = SID_UNCONFIGURED;
drvdata->anc_status = ANC_UNCONFIGURED;
dev_set_drvdata(&pdev->dev, drvdata);
--
1.8.4.1
next prev parent reply other threads:[~2013-10-30 7:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 7:34 [PATCH 0/9] ASoC: Yet another small fixes Takashi Iwai
2013-10-30 7:34 ` Takashi Iwai [this message]
2013-10-30 16:33 ` [PATCH 1/9] ASoC: ab8500: Add missing of NULL check of devm_kzalloc() Mark Brown
2013-10-30 7:35 ` [PATCH 2/9] ASoC: ab8500: Add missing return in ab8500_codec_set_dai_fmt() Takashi Iwai
2013-10-30 7:35 ` [PATCH 3/9] ASoC: ab8500: Fix invalid cast to long pointer Takashi Iwai
2013-10-30 16:34 ` Mark Brown
2013-10-30 7:35 ` [PATCH 4/9] ASoC: wm_hubs: Add missing break in hp_supply_event() Takashi Iwai
2013-10-30 16:35 ` Mark Brown
2013-10-30 7:35 ` [PATCH 5/9] ASoC: wm0010: Fix possible out-of-bounds array read Takashi Iwai
2013-10-30 16:38 ` Mark Brown
2013-10-30 17:32 ` Takashi Iwai
2013-10-30 21:32 ` Mark Brown
2013-10-30 7:35 ` [PATCH 6/9] ASoC: max98095: Add missing negative channel checks Takashi Iwai
2013-10-30 16:46 ` Mark Brown
2013-10-30 17:36 ` Takashi Iwai
2013-10-30 21:31 ` Mark Brown
2013-10-31 7:24 ` Takashi Iwai
2013-10-30 7:35 ` [PATCH 7/9] ASoC: ml26124: Fix negative array index read Takashi Iwai
2013-10-30 16:48 ` Mark Brown
2013-10-30 17:40 ` Takashi Iwai
2013-10-30 21:33 ` Mark Brown
2013-10-30 7:35 ` [PATCH 8/9] ASoC: rt5640: Fix ignored error checks Takashi Iwai
2013-10-30 16:49 ` Mark Brown
2013-10-30 7:35 ` [PATCH 9/9] ASoC: wm8996: Fix negative array index read Takashi Iwai
2013-10-30 16:51 ` Mark Brown
2013-10-30 17:33 ` Takashi Iwai
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=1383118507-21503-2-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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).