USB: Prepare for refactoring by adding extra udev checks.

The next patch will refactor the hub port code to rip out the
recursive
call to hub_port_reset on a failed hot reset.  In preparation
for that,
make sure all code paths can deal with being called with a
NULL udev.
The usb_device will not be valid if warm reset was issued
because a port
transitioned to the Inactive or Compliance Mode on a
device connect.

This patch should have no effect on current
behavior.

Signed-off-by: Sarah Sharp
<sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern
<stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman
<gregkh@linuxfoundation.org>

idea is taken here -
https://github.com/varunchitre15/thunderzap_xl/commit/038cc3093e00cbce8addbec3e4334c5c6772a7f6