提交 4819fef5 编写于 作者: M Matt Evans 提交者: Sarah Sharp

xhci: Bigendian fix for xhci_check_bandwidth()

Commit 834cb0fc "xhci: Fix memory leak
bug when dropping endpoints" added a small endian bug.  This patch fixes
xhci_check_bandwidth() to read add/drop_flags LE.
Signed-off-by: NMatt Evans <matt@ozlabs.org>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
上级 f6975314
......@@ -1849,8 +1849,8 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
/* Free any rings that were dropped, but not changed. */
for (i = 1; i < 31; ++i) {
if ((ctrl_ctx->drop_flags & (1 << (i + 1))) &&
!(ctrl_ctx->add_flags & (1 << (i + 1))))
if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) &&
!(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1))))
xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i);
}
xhci_zero_in_ctx(xhci, virt_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册