xhci: fix list access before init
commit 88696ae432ce7321540ac53d9caab3de9118b094 upstream.
If for whatever reason we fall into fail path in xhci_mem_init()
before bw table gets initialized we may access the uninitialized lists
Check for bw table before traversing lists in cleanup routine.
This patch should be backported to kernels as old as 3.2, that contain
the commit 839c817ce67178ca3c7c7ad534c571bba1e69ebe "xhci: Store
information about roothubs and TTs."
Reported-by: Sergey Dyasly <email@example.com>
Tested-by: Sergey Dyasly <firstname.lastname@example.org>
Signed-off-by: Vladimir Murzin <email@example.com>
Signed-off-by: Sarah Sharp <firstname.lastname@example.org>
Signed-off-by: Ben Hutchings <email@example.com>
1 file changed