diff options
Diffstat (limited to 'drivers/media/dvb/frontends/mt2060.c')
-rw-r--r-- | drivers/media/dvb/frontends/mt2060.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/mt2060.c b/drivers/media/dvb/frontends/mt2060.c index 19bd66a1816a..450fad8d9b65 100644 --- a/drivers/media/dvb/frontends/mt2060.c +++ b/drivers/media/dvb/frontends/mt2060.c | |||
@@ -332,14 +332,14 @@ static const struct dvb_tuner_ops mt2060_tuner_ops = { | |||
332 | }; | 332 | }; |
333 | 333 | ||
334 | /* This functions tries to identify a MT2060 tuner by reading the PART/REV register. This is hasty. */ | 334 | /* This functions tries to identify a MT2060 tuner by reading the PART/REV register. This is hasty. */ |
335 | int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1) | 335 | struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1) |
336 | { | 336 | { |
337 | struct mt2060_priv *priv = NULL; | 337 | struct mt2060_priv *priv = NULL; |
338 | u8 id = 0; | 338 | u8 id = 0; |
339 | 339 | ||
340 | priv = kzalloc(sizeof(struct mt2060_priv), GFP_KERNEL); | 340 | priv = kzalloc(sizeof(struct mt2060_priv), GFP_KERNEL); |
341 | if (priv == NULL) | 341 | if (priv == NULL) |
342 | return -ENOMEM; | 342 | return NULL; |
343 | 343 | ||
344 | priv->cfg = cfg; | 344 | priv->cfg = cfg; |
345 | priv->i2c = i2c; | 345 | priv->i2c = i2c; |
@@ -347,12 +347,12 @@ int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt206 | |||
347 | 347 | ||
348 | if (mt2060_readreg(priv,REG_PART_REV,&id) != 0) { | 348 | if (mt2060_readreg(priv,REG_PART_REV,&id) != 0) { |
349 | kfree(priv); | 349 | kfree(priv); |
350 | return -ENODEV; | 350 | return NULL; |
351 | } | 351 | } |
352 | 352 | ||
353 | if (id != PART_REV) { | 353 | if (id != PART_REV) { |
354 | kfree(priv); | 354 | kfree(priv); |
355 | return -ENODEV; | 355 | return NULL; |
356 | } | 356 | } |
357 | printk(KERN_INFO "MT2060: successfully identified (IF1 = %d)\n", if1); | 357 | printk(KERN_INFO "MT2060: successfully identified (IF1 = %d)\n", if1); |
358 | memcpy(&fe->ops.tuner_ops, &mt2060_tuner_ops, sizeof(struct dvb_tuner_ops)); | 358 | memcpy(&fe->ops.tuner_ops, &mt2060_tuner_ops, sizeof(struct dvb_tuner_ops)); |
@@ -361,7 +361,7 @@ int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt206 | |||
361 | 361 | ||
362 | mt2060_calibrate(priv); | 362 | mt2060_calibrate(priv); |
363 | 363 | ||
364 | return 0; | 364 | return fe; |
365 | } | 365 | } |
366 | EXPORT_SYMBOL(mt2060_attach); | 366 | EXPORT_SYMBOL(mt2060_attach); |
367 | 367 | ||