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 <firstname.lastname@example.org>
Tested-by: Sergey Dyasly <email@example.com>
Signed-off-by: Vladimir Murzin <firstname.lastname@example.org>
Signed-off-by: Sarah Sharp <email@example.com>
Signed-off-by: Ben Hutchings <firstname.lastname@example.org>
1 file changed