From 4d6efc7a96c126f2b21ffd4edad9b11144a0336a Mon Sep 17 00:00:00 2001 From: Luis Alves Date: Thu, 17 Jul 2014 16:38:08 -0300 Subject: [PATCH] [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 Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/si2168.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 303a441a05a9..3e3fd2a6ca6f 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -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)); -- 2.20.1