summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/ds3000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb-frontends/ds3000.c')
-rw-r--r--drivers/media/dvb-frontends/ds3000.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
index 0b17a45c5640..c2959a9695a7 100644
--- a/drivers/media/dvb-frontends/ds3000.c
+++ b/drivers/media/dvb-frontends/ds3000.c
@@ -277,10 +277,8 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
u8 *buf;
buf = kmalloc(33, GFP_KERNEL);
- if (buf == NULL) {
- printk(KERN_ERR "Unable to kmalloc\n");
+ if (!buf)
return -ENOMEM;
- }
*(buf) = reg;
@@ -842,10 +840,8 @@ struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
/* allocate memory for the internal state */
state = kzalloc(sizeof(struct ds3000_state), GFP_KERNEL);
- if (state == NULL) {
- printk(KERN_ERR "Unable to kmalloc\n");
+ if (!state)
goto error2;
- }
state->config = config;
state->i2c = i2c;