diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-12-31 08:08:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-06 12:50:17 -0200 |
commit | 5584c641be9e4ff812443511363a72edaa5ceeaa (patch) | |
tree | f3ba8db91b3db4cff7a8cee82ae2dea8a20b0e7c /drivers/media/dvb/dm1105 | |
parent | 2dbbac330621e83d00e904d1139b62e7b360f946 (diff) | |
download | linux-5584c641be9e4ff812443511363a72edaa5ceeaa.tar.gz linux-5584c641be9e4ff812443511363a72edaa5ceeaa.tar.bz2 linux-5584c641be9e4ff812443511363a72edaa5ceeaa.zip |
[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: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dm1105')
-rw-r--r-- | drivers/media/dvb/dm1105/dm1105.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c index 55e6533f15e9..70e040b999e7 100644 --- a/drivers/media/dvb/dm1105/dm1105.c +++ b/drivers/media/dvb/dm1105/dm1105.c @@ -1115,11 +1115,14 @@ static int __devinit dm1105_probe(struct pci_dev *pdev, if (ret < 0) 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); if (ret < 0) goto err_disconnect_frontend; - dvb_net_init(dvb_adapter, &dev->dvbnet, dmx); dm1105_ir_init(dev); INIT_WORK(&dev->work, dm1105_dmx_buffer); |