V4L/DVB: drivers/media: Use kzalloc
[safe/jmp/linux-2.6] / drivers / media / dvb / frontends / ds3000.c
index 78001e8..fc61d92 100644 (file)
@@ -969,15 +969,12 @@ struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
        dprintk("%s\n", __func__);
 
        /* allocate memory for the internal state */
-       state = kmalloc(sizeof(struct ds3000_state), GFP_KERNEL);
+       state = kzalloc(sizeof(struct ds3000_state), GFP_KERNEL);
        if (state == NULL) {
                printk(KERN_ERR "Unable to kmalloc\n");
                goto error2;
        }
 
-       /* setup the state */
-       memset(state, 0, sizeof(struct ds3000_state));
-
        state->config = config;
        state->i2c = i2c;
        state->prevUCBS2 = 0;