usb: fail on usb_hub_create_port_device() errors
authorKrzysztof Mazur <krzysiek@podlesie.net>
Thu, 22 Aug 2013 12:49:39 +0000 (14:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Aug 2013 17:47:17 +0000 (10:47 -0700)
commite58547eb9561a8a72d46e2d411090a614d33ac0e
tree1952a435bc6a5c710df71c8692f5af9ca2ee0c7f
parentd0308d4b6b02597f39fc31a9bddf7bb3faad5622
usb: fail on usb_hub_create_port_device() errors

Ignoring usb_hub_create_port_device() errors cause later NULL pointer
deference when uninitialized hub->ports[i] entries are dereferenced
after port memory allocation error.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c