Commit 03500fbb authored by Dan Carpenter's avatar Dan Carpenter Committed by sanglipeng
Browse files

Revert "usb: xhci: tegra: Fix error check"

stable inclusion
from stable-v5.10.190
commit 65cd02e3c37e431be841d859fab8d2e10ecc7bc8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=65cd02e3c37e431be841d859fab8d2e10ecc7bc8



--------------------------------

commit 288b4fa1 upstream.

This reverts commit 18fc7c43.

The reverted commit was based on static analysis and a misunderstanding
of how PTR_ERR() and NULLs are supposed to work.  When a function
returns both pointer errors and NULL then normally the NULL means
"continue operating without a feature because it was deliberately
turned off".  The NULL should not be treated as a failure.  If a driver
cannot work when that feature is disabled then the KConfig should
enforce that the function cannot return NULL.  We should not need to
test for it.

In this code, the patch means that certain tegra_xusb_probe() will
fail if the firmware supports power-domains but CONFIG_PM is disabled.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: 18fc7c43 ("usb: xhci: tegra: Fix error check")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/8baace8d-fb4b-41a4-ad5f-848ae643a23b@moroto.mountain


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent d2622910
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment