usb: ehci: tegra: avoid NULL pointer access
authorBo Yan <byan@nvidia.com>
Tue, 20 Aug 2013 19:42:12 +0000 (12:42 -0700)
committerMrutyunjay Sawant <msawant@nvidia.com>
Mon, 26 Aug 2013 08:37:44 +0000 (01:37 -0700)
commitd2a44b34c8445c076414badf2fb7f174fa38cbea
treed4f09be2c9a87283a20074e82556472d7b7ef70c
parentd4c742739a9156d80b33a5074cd10f6308b18c4c
usb: ehci: tegra: avoid NULL pointer access

there is a race between hcd shutdown and ehci init. If ehci init is
not completed, the tegra->ehci may be NULL, we will have a crash if
tgra_ehci_hcd_shutdown is called in the process of warm reboot or
shutdown.

Change-Id: Ibc151b5d718228f11cc53549e45b32b20ab14c30
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/264015
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rick Song <ricks@nvidia.com>
drivers/usb/host/ehci-tegra.c