summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Peng <robinpeng@google.com>2021-12-14 18:31:07 +0000
committerRobin Peng <robinpeng@google.com>2021-12-14 18:31:07 +0000
commita6a6c71b9de9b6e4780bbfaaae51fe8c74e60eef (patch)
treeb13681d96bd207bb8df097065d85e36cd4a06120
parentd7c9dd3094c064c87478b54e158658aecd4aeaf2 (diff)
parent8b8a3a76e97439b8009c6d0c173767c27261fbb0 (diff)
downloadaoc-a6a6c71b9de9b6e4780bbfaaae51fe8c74e60eef.tar.gz
Merge "Merge android12-gs-pixel-5.10-sc-v2 into android13-gs-pixel-5.10-gs101" into android13-gs-pixel-5.10-gs101
-rw-r--r--usb/xhci_hooks_impl_whi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usb/xhci_hooks_impl_whi.c b/usb/xhci_hooks_impl_whi.c
index 15b848a..b4075bc 100644
--- a/usb/xhci_hooks_impl_whi.c
+++ b/usb/xhci_hooks_impl_whi.c
@@ -714,6 +714,10 @@ static void free_transfer_ring(struct xhci_hcd *xhci,
ep_type = CTX_TO_EP_TYPE(le32_to_cpu(ep_ctx->ep_info2));
ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx);
+ if (!ctrl_ctx) {
+ xhci_warn(xhci, "%s: Could not get input context, bad type.\n", __func__);
+ return;
+ }
ep_is_added = EP_IS_ADDED(ctrl_ctx, ep_index);
ep_is_dropped = EP_IS_DROPPED(ctrl_ctx, ep_index);