From: Thierry Reding Date: Wed, 3 Apr 2013 19:57:57 +0000 (+0200) Subject: usb: host: ehci-tegra: Fix oops in error cleanup X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~135^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=369a9a9d2af702bac3ccd2ade86ddcb2594eb3b1;p=pandora-kernel.git 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: Thierry Reding Acked-by: Stephen Warren Acked-by: Venu Byravarasu Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed