Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
[sfrench/cifs-2.6.git] / drivers / media / dvb / frontends / zl10036.c
index 4627f491656bcf90f239ff419a1a627672ddb38f..81aa984c551f3516b7179aaab4624d4039252df9 100644 (file)
@@ -463,16 +463,16 @@ struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe,
                                    const struct zl10036_config *config,
                                    struct i2c_adapter *i2c)
 {
-       struct zl10036_state *state = NULL;
+       struct zl10036_state *state;
        int ret;
 
-       if (NULL == config) {
+       if (!config) {
                printk(KERN_ERR "%s: no config specified", __func__);
-               goto error;
+               return NULL;
        }
 
        state = kzalloc(sizeof(struct zl10036_state), GFP_KERNEL);
-       if (NULL == state)
+       if (!state)
                return NULL;
 
        state->config = config;
@@ -507,7 +507,7 @@ struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe,
        return fe;
 
 error:
-       zl10036_release(fe);
+       kfree(state);
        return NULL;
 }
 EXPORT_SYMBOL(zl10036_attach);