Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 369a9a9d authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman
Browse files

usb: host: ehci-tegra: Fix oops in error cleanup



The cleanup path checks whether the transceiver was properly initialized
using IS_ERR(). However it can also happen that the cleanup path is run
before the transceiver was initialized (or the operating mode isn't set
to TEGRA_USB_OTG) and is therefore NULL. Add a separate label for error
unwinding and initialize the transceiver field to ERR_PTR(-ENODEV) when
the operating mode isn't TEGRA_USB_OTG to allow for consistent checking.

Signed-off-by: default avatarThierry Reding <thierry@gilfi.de>
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarVenu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb5369ed
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