media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device()
Use the newer API returning an ERRPTR and use the new helper to bail out. Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
32dc63f691
commit
a7070891f9
|
@ -170,8 +170,9 @@ int c8sectpfe_frontend_attach(struct dvb_frontend **fe,
|
||||||
|
|
||||||
/* attach tuner */
|
/* attach tuner */
|
||||||
request_module("tda18212");
|
request_module("tda18212");
|
||||||
client = i2c_new_device(tsin->i2c_adapter, &tda18212_info);
|
client = i2c_new_client_device(tsin->i2c_adapter,
|
||||||
if (!client || !client->dev.driver) {
|
&tda18212_info);
|
||||||
|
if (!i2c_client_has_driver(client)) {
|
||||||
dvb_frontend_detach(*fe);
|
dvb_frontend_detach(*fe);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue