diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-12-31 08:10:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-06 12:50:39 -0200 |
commit | 60826f02695476ded2fecc67949c83dc4b49def7 (patch) | |
tree | 3f09c67579560db28a452b46e0c553b0ab4b9665 | |
parent | 5584c641be9e4ff812443511363a72edaa5ceeaa (diff) | |
download | linux-60826f02695476ded2fecc67949c83dc4b49def7.tar.gz linux-60826f02695476ded2fecc67949c83dc4b49def7.tar.bz2 linux-60826f02695476ded2fecc67949c83dc4b49def7.zip |
[media] dvb-usb: handle errors from dvb_net_init
From an audit of dvb_net_init callers, now that that function
returns -errno on error.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index ba4a7517354f..ddf282f355b3 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c @@ -141,11 +141,17 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) goto err_dmx_dev; } - dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx); + if ((ret = dvb_net_init(&adap->dvb_adap, &adap->dvb_net, + &adap->demux.dmx)) < 0) { + err("dvb_net_init failed: error %d",ret); + goto err_net_init; + } adap->state |= DVB_USB_ADAP_STATE_DVB; return 0; +err_net_init: + dvb_dmxdev_release(&adap->dmxdev); err_dmx_dev: dvb_dmx_release(&adap->demux); err_dmx: |