提交 fe6e87a4 编写于 作者: D David Vrabel

wusb: fix oops when terminating a non-existant reservation

If a reservation was not established, do not try terminating it.
Signed-off-by: NDavid Vrabel <david.vrabel@csr.com>
上级 671e470e
......@@ -110,6 +110,9 @@ int wusbhc_rsv_establish(struct wusbhc *wusbhc)
*/
void wusbhc_rsv_terminate(struct wusbhc *wusbhc)
{
uwb_rsv_terminate(wusbhc->rsv);
uwb_rsv_destroy(wusbhc->rsv);
if (wusbhc->rsv) {
uwb_rsv_terminate(wusbhc->rsv);
uwb_rsv_destroy(wusbhc->rsv);
wusbhc->rsv = NULL;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册