diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-09-18 20:26:53 -0300 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-09-18 20:26:53 -0300 |
commit | 1b3c6a946d980cf70b0679679e3b56d7ce563db4 (patch) | |
tree | 3e90fe5a66057a9257815b4e24acb4ee789ae03e /linux/drivers/media/dvb/frontends/s921_module.c | |
parent | 49cbf78b4386e4d4519cb6cd76af2b4c2bb8e395 (diff) | |
download | mediapointer-dvb-s2-1b3c6a946d980cf70b0679679e3b56d7ce563db4.tar.gz mediapointer-dvb-s2-1b3c6a946d980cf70b0679679e3b56d7ce563db4.tar.bz2 |
kmalloc failure ignored in lgdt3304_attach() and s921_attach()
From: Roel Kluin <roel.kluin@gmail.com>
Prevent NULL dereference if kmalloc() fails.
Priority: normal
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
CC: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s921_module.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/s921_module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/s921_module.c b/linux/drivers/media/dvb/frontends/s921_module.c index 4a673c184..55f8f8d8d 100644 --- a/linux/drivers/media/dvb/frontends/s921_module.c +++ b/linux/drivers/media/dvb/frontends/s921_module.c @@ -233,6 +233,8 @@ struct dvb_frontend* s921_attach(const struct s921_config *config, struct s921_state *state; state = kzalloc(sizeof(struct s921_state), GFP_KERNEL); + if (state == NULL) + return NULL; state->addr = config->i2c_address; state->i2c = i2c; |