From: Sudip Mukherjee Date: Sun, 11 Oct 2020 20:50:08 +0000 (+0100) Subject: usb: host: ehci-sched: add comment about find_tt() not returning error X-Git-Tag: v5.15~2220^2~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23eac8531acdec3bdbd920d5ec0d7747508eaaab;p=platform%2Fkernel%2Flinux-starfive.git usb: host: ehci-sched: add comment about find_tt() not returning error Add a comment explaining why find_tt() will not return error even though find_tt() is checking for NULL and other errors. Acked-by: Alan Stern Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20201011205008.24369-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 6dfb242..0f85aa9 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -244,6 +244,12 @@ static void reserve_release_intr_bandwidth(struct ehci_hcd *ehci, /* FS/LS bus bandwidth */ if (tt_usecs) { + /* + * find_tt() will not return any error here as we have + * already called find_tt() before calling this function + * and checked for any error return. The previous call + * would have created the data structure. + */ tt = find_tt(qh->ps.udev); if (sign > 0) list_add_tail(&qh->ps.ps_list, &tt->ps_list); @@ -1337,6 +1343,12 @@ static void reserve_release_iso_bandwidth(struct ehci_hcd *ehci, } } + /* + * find_tt() will not return any error here as we have + * already called find_tt() before calling this function + * and checked for any error return. The previous call + * would have created the data structure. + */ tt = find_tt(stream->ps.udev); if (sign > 0) list_add_tail(&stream->ps.ps_list, &tt->ps_list);