aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/lg2160.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb-frontends/lg2160.c')
-rw-r--r--drivers/media/dvb-frontends/lg2160.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/lg2160.c b/drivers/media/dvb-frontends/lg2160.c
index cc11260e99df..5fd14f840ab0 100644
--- a/drivers/media/dvb-frontends/lg2160.c
+++ b/drivers/media/dvb-frontends/lg2160.c
@@ -1421,8 +1421,8 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
1421 config ? config->i2c_addr : 0); 1421 config ? config->i2c_addr : 0);
1422 1422
1423 state = kzalloc(sizeof(struct lg216x_state), GFP_KERNEL); 1423 state = kzalloc(sizeof(struct lg216x_state), GFP_KERNEL);
1424 if (state == NULL) 1424 if (!state)
1425 goto fail; 1425 return NULL;
1426 1426
1427 state->cfg = config; 1427 state->cfg = config;
1428 state->i2c_adap = i2c_adap; 1428 state->i2c_adap = i2c_adap;
@@ -1449,10 +1449,6 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
1449 state->frontend.dtv_property_cache.atscmh_parade_id = 1; 1449 state->frontend.dtv_property_cache.atscmh_parade_id = 1;
1450 1450
1451 return &state->frontend; 1451 return &state->frontend;
1452fail:
1453 lg_warn("unable to detect LG216x hardware\n");
1454 kfree(state);
1455 return NULL;
1456} 1452}
1457EXPORT_SYMBOL(lg2160_attach); 1453EXPORT_SYMBOL(lg2160_attach);
1458 1454