提交 b62fd172 编写于 作者: A Antti Palosaari 提交者: Mauro Carvalho Chehab

[media] dvb_usb_v2: do not try to remove non-existent adapter

Check that adapter exists before trying to remove it.
Signed-off-by: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d10d1b9a
......@@ -717,9 +717,11 @@ static int dvb_usbv2_adapter_exit(struct dvb_usb_device *d)
dev_dbg(&d->udev->dev, "%s:\n", __func__);
for (i = MAX_NO_OF_ADAPTER_PER_DEVICE - 1; i >= 0; i--) {
dvb_usbv2_adapter_frontend_exit(&d->adapter[i]);
dvb_usbv2_adapter_dvb_exit(&d->adapter[i]);
dvb_usbv2_adapter_stream_exit(&d->adapter[i]);
if (d->adapter[i].props) {
dvb_usbv2_adapter_frontend_exit(&d->adapter[i]);
dvb_usbv2_adapter_dvb_exit(&d->adapter[i]);
dvb_usbv2_adapter_stream_exit(&d->adapter[i]);
}
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册