Skip to content
Commit d0308d4b authored by Krzysztof Mazur's avatar Krzysztof Mazur Committed by Greg Kroah-Hartman
Browse files

usb: fix cleanup after failure in hub_configure()



If the hub_configure() fails after setting the hdev->maxchild
the hub->ports might be NULL or point to uninitialized kzallocated
memory causing NULL pointer dereference in hub_quiesce() during cleanup.

Now after such error the hdev->maxchild is set to 0 to avoid cleanup
of uninitialized ports.

Signed-off-by: default avatarKrzysztof Mazur <krzysiek@podlesie.net>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f375fc52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment