Commit 5584c641 authored by Jonathan Nieder's avatar Jonathan Nieder Committed by Mauro Carvalho Chehab

[media] dm1105: handle errors from dvb_net_init

Clean up and error out if dvb_net_init fails (for example due to
ENOMEM).  This involves moving the dvb_net_init call to before
frontend_init to make cleaning up a little easier.

From an audit of dvb_net_init callers, now that dvb_net_init lets
callers know about errors.
Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2dbbac33
...@@ -1115,11 +1115,14 @@ static int __devinit dm1105_probe(struct pci_dev *pdev, ...@@ -1115,11 +1115,14 @@ static int __devinit dm1105_probe(struct pci_dev *pdev,
if (ret < 0) if (ret < 0)
goto err_remove_mem_frontend; goto err_remove_mem_frontend;
ret = dvb_net_init(dvb_adapter, &dev->dvbnet, dmx);
if (ret < 0)
goto err_disconnect_frontend;
ret = frontend_init(dev); ret = frontend_init(dev);
if (ret < 0) if (ret < 0)
goto err_disconnect_frontend; goto err_disconnect_frontend;
dvb_net_init(dvb_adapter, &dev->dvbnet, dmx);
dm1105_ir_init(dev); dm1105_ir_init(dev);
INIT_WORK(&dev->work, dm1105_dmx_buffer); INIT_WORK(&dev->work, dm1105_dmx_buffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment