summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-09-18 21:03:34 -0300
committerDouglas Schilling Landgraf <dougsland@redhat.com>2009-09-18 21:03:34 -0300
commitaf0023cff95d8d74ccf1b7aacaa67114c51b07b2 (patch)
treed30283f1677806190664efe3d0f74f7010bbf1e0 /linux/drivers/media
parent4531ca9b59c2253c2e28cfeaa5119bf09166e029 (diff)
downloadmediapointer-dvb-s2-af0023cff95d8d74ccf1b7aacaa67114c51b07b2.tar.gz
mediapointer-dvb-s2-af0023cff95d8d74ccf1b7aacaa67114c51b07b2.tar.bz2
kzalloc failure ignored in au8522_probe()
From: Roel Kluin <roel.kluin@gmail.com> Prevent NULL dereference if kzalloc() fails. Priority: normal Signed-off-by: Roel Kluin <roel.kluin@gmail.com> CC: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/frontends/au8522_decoder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/au8522_decoder.c b/linux/drivers/media/dvb/frontends/au8522_decoder.c
index 0d449ce23..8e218e818 100644
--- a/linux/drivers/media/dvb/frontends/au8522_decoder.c
+++ b/linux/drivers/media/dvb/frontends/au8522_decoder.c
@@ -798,6 +798,11 @@ static int au8522_probe(struct i2c_client *client,
}
demod_config = kzalloc(sizeof(struct au8522_config), GFP_KERNEL);
+ if (demod_config == NULL) {
+ if (instance == 1)
+ kfree(state);
+ return -ENOMEM;
+ }
demod_config->demod_address = 0x8e >> 1;
state->config = demod_config;