diff options
author | Amit Choudhary <amit2030@gmail.com> | 2006-10-09 16:03:52 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-10-22 10:51:06 +0200 |
commit | b1e8a791c77bd35f88b678ce761928583efd8cd0 (patch) | |
tree | b128b031f35e955eb83cd3ab8a5b4550b75914b6 /sound/isa/ad1816a | |
parent | [ALSA] sound/isa/cmi8330.c: check kmalloc() return value (diff) | |
download | linux-b1e8a791c77bd35f88b678ce761928583efd8cd0.tar.xz linux-b1e8a791c77bd35f88b678ce761928583efd8cd0.zip |
[ALSA] sound/isa/ad1816a/ad1816a.c: check kmalloc() return value
Check the return value of kmalloc() in function snd_card_ad1816a_pnp(),
in file sound/isa/ad1816a/ad1816a.c.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa/ad1816a')
-rw-r--r-- | sound/isa/ad1816a/ad1816a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index b33a5fb59ec2..59034507175b 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c @@ -120,6 +120,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); int err; + if (!cfg) + return -ENOMEM; acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); if (acard->dev == NULL) { kfree(cfg); |