]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xhci: tegra: Prevent error pointer dereference
authorThierry Reding <treding@nvidia.com>
Wed, 20 Feb 2019 13:48:41 +0000 (14:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:10:15 +0000 (07:10 +0100)
commit06937f4660585c4b1425a99d4409d056b0dd42dc
tree6e8ff054b9dd575f1fadc5fdd6aed366374f3563
parentb3a9963ed5df9c3f520a51281bf8d11714324871
xhci: tegra: Prevent error pointer dereference

commit 0326ccb5feac6eac35ba6254260e2774277cd976 upstream.

During initialization, the host and super-speed power domains will
contain an ERR_PTR() encoded error code rather than being NULL. To
avoid a crash, use a !IS_ERR_OR_NULL() condition during cleanup.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Fixes: 6494a9ad86de ("usb: xhci: tegra: Add genpd support")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-tegra.c