[media] si2168: Fix i2c_add_mux_adapter return value

In case of failure the return value was always 0. Return proper
error code (ENODEV) instead.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Luis Alves 2014-07-17 16:38:08 -03:00 committed by Mauro Carvalho Chehab
parent 43911776fa
commit 4d6efc7a96
1 changed files with 3 additions and 1 deletions

View File

@ -640,8 +640,10 @@ static int si2168_probe(struct i2c_client *client,
/* create mux i2c adapter for tuner */ /* create mux i2c adapter for tuner */
s->adapter = i2c_add_mux_adapter(client->adapter, &client->dev, s, s->adapter = i2c_add_mux_adapter(client->adapter, &client->dev, s,
0, 0, 0, si2168_select, si2168_deselect); 0, 0, 0, si2168_select, si2168_deselect);
if (s->adapter == NULL) if (s->adapter == NULL) {
ret = -ENODEV;
goto err; goto err;
}
/* create dvb_frontend */ /* create dvb_frontend */
memcpy(&s->fe.ops, &si2168_ops, sizeof(struct dvb_frontend_ops)); memcpy(&s->fe.ops, &si2168_ops, sizeof(struct dvb_frontend_ops));