]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-usb/dtt200u-fe.c
Merge branch 'x86/debug' into x86/cpu
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-usb / dtt200u-fe.c
index b032523b07bc42aaeac7116926e6a7824e7702ed..17413adec7a1fbd92199c97d0a45f2dfa37e8875 100644 (file)
@@ -155,23 +155,20 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
        struct dtt200u_fe_state* state = NULL;
 
        /* allocate memory for the internal state */
-       state = (struct dtt200u_fe_state*) kmalloc(sizeof(struct dtt200u_fe_state), GFP_KERNEL);
+       state = kzalloc(sizeof(struct dtt200u_fe_state), GFP_KERNEL);
        if (state == NULL)
                goto error;
-       memset(state,0,sizeof(struct dtt200u_fe_state));
 
        deb_info("attaching frontend dtt200u\n");
 
        state->d = d;
 
-       state->frontend.ops = &dtt200u_fe_ops;
+       memcpy(&state->frontend.ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops));
        state->frontend.demodulator_priv = state;
 
-       goto success;
+       return &state->frontend;
 error:
        return NULL;
-success:
-       return &state->frontend;
 }
 
 static struct dvb_frontend_ops dtt200u_fe_ops = {