From: Thomas Pugliese Date: Fri, 28 Feb 2014 21:15:19 +0000 (-0600) Subject: usb: wusbcore: adjust iterator correctly when searching for ep comp descriptor X-Git-Tag: v3.15-rc1~137^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4659a2452baa7d89324fda097158d7f8fe71e0cb;p=pandora-kernel.git usb: wusbcore: adjust iterator correctly when searching for ep comp descriptor If the endpoint companion descriptor is not the first descriptor in the extra descriptor buffer of a usb_host_endpoint, the loop in rpipe_epc_find will get its buffer pointer and remaining size values out of sync. The buffer ptr 'itr' is advanced by the descriptor's bLength field but the remaining size value 'itr_size' is decremented by the bDescriptorType field which is incorrect. This patch fixes the loop to decrement itr_size by bLength as it should. Signed-off-by: Thomas Pugliese Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed