Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <stern@rowland.harvard.edu>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20201011205008.24369-1-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sudip Mukherjee and committed by
Greg Kroah-Hartman
23eac853 3650b228

+12
+12
drivers/usb/host/ehci-sched.c
··· 244 244 245 245 /* FS/LS bus bandwidth */ 246 246 if (tt_usecs) { 247 + /* 248 + * find_tt() will not return any error here as we have 249 + * already called find_tt() before calling this function 250 + * and checked for any error return. The previous call 251 + * would have created the data structure. 252 + */ 247 253 tt = find_tt(qh->ps.udev); 248 254 if (sign > 0) 249 255 list_add_tail(&qh->ps.ps_list, &tt->ps_list); ··· 1343 1337 } 1344 1338 } 1345 1339 1340 + /* 1341 + * find_tt() will not return any error here as we have 1342 + * already called find_tt() before calling this function 1343 + * and checked for any error return. The previous call 1344 + * would have created the data structure. 1345 + */ 1346 1346 tt = find_tt(stream->ps.udev); 1347 1347 if (sign > 0) 1348 1348 list_add_tail(&stream->ps.ps_list, &tt->ps_list);