summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r--linux/drivers/media/dvb/frontends/lgdt3304.c2
-rw-r--r--linux/drivers/media/dvb/frontends/s921_module.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/lgdt3304.c b/linux/drivers/media/dvb/frontends/lgdt3304.c
index 3a4a18970..c71ccf029 100644
--- a/linux/drivers/media/dvb/frontends/lgdt3304.c
+++ b/linux/drivers/media/dvb/frontends/lgdt3304.c
@@ -383,6 +383,8 @@ struct dvb_frontend* lgdt3304_attach(const struct lgdt3304_config *config,
struct lgdt3304_state *state;
state = kzalloc(sizeof(struct lgdt3304_state), GFP_KERNEL);
+ if (state == NULL)
+ return NULL;
state->addr = config->i2c_address;
state->i2c = i2c;
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;