summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/epautoconf.c
diff options
context:
space:
mode:
authorJakob Koschel <jakobkoschel@gmail.com>2022-03-08 20:18:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-15 20:19:44 +0300
commite6169a870f5b0a656b368bf8901f1144b0fb6e22 (patch)
treeeb5bc7623246f34d053cd079d44cda119e070357 /drivers/usb/gadget/epautoconf.c
parentac7a5d0535d20e399385500ea3272599407d903a (diff)
downloadlinux-e6169a870f5b0a656b368bf8901f1144b0fb6e22.tar.xz
usb: gadget: net2272: remove usage of list iterator past the loop body
If the list representing the request queue does not contain the expected request, the value of the list_for_each_entry() iterator will not point to a valid structure. To avoid type confusion in such case, the list iterator scope will be limited to the list_for_each_entry() loop. In preparation to limiting scope of the list iterator to the list traversal loop, use a dedicated pointer to point to the found request object [1]. Link: https://lore.kernel.org/all/YhdfEIwI4EdtHdym@kroah.com/ Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Link: https://lore.kernel.org/r/20220308171818.384491-12-jakobkoschel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/epautoconf.c')
0 files changed, 0 insertions, 0 deletions