OSDN Git Service

[media] si2168: Fix i2c_add_mux_adapter return value
authorLuis Alves <ljalvs@gmail.com>
Thu, 17 Jul 2014 19:38:08 +0000 (16:38 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 00:24:14 +0000 (21:24 -0300)
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>
drivers/media/dvb-frontends/si2168.c

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