diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-18 20:26:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-19 00:53:16 -0300 |
commit | 8d04df4997b530d978d48a66655a99714af197ca (patch) | |
tree | 2fbe1c592d871b41b848b2ce58f0320aa5038a4d /drivers/media/dvb/frontends/s921_module.c | |
parent | 1601fb14980b1295e00087460d57256a87f334bf (diff) |
V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
Prevent NULL dereference if kmalloc() fails.
Cc: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/s921_module.c')
-rw-r--r-- | drivers/media/dvb/frontends/s921_module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/s921_module.c b/drivers/media/dvb/frontends/s921_module.c index 3f5a0e1dfdf..3156b64cfc9 100644 --- a/drivers/media/dvb/frontends/s921_module.c +++ b/drivers/media/dvb/frontends/s921_module.c @@ -169,6 +169,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; |