Phy APIs have checks for NULL pointer. No need to check it here. Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx> --- drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 3b71516..af698d1 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4619,7 +4619,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, /* Disconnect any existing devices under this port */ if (udev) { - if (hcd->usb_phy && !hdev->parent) + if (!hdev->parent) usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); usb_disconnect(&port_dev->child); } @@ -4779,7 +4779,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, spin_unlock_irq(&device_state_lock); mutex_unlock(&usb_port_peer_mutex); } else { - if (hcd->usb_phy && !hdev->parent) + if (!hdev->parent) usb_phy_notify_connect(hcd->usb_phy, udev->speed); } -- 2.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html