Commit a8291be
Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()"
This reverts commit f08aa7c.
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 driver, the bug means that probe cannot succeed when CONFIG_PM
is disabled.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: f08aa7c ("usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/ZKQoBa84U/ykEh3C@moroto
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 288b4fa commit a8291be
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3718 | 3718 | | |
3719 | 3719 | | |
3720 | 3720 | | |
3721 | | - | |
3722 | | - | |
| 3721 | + | |
| 3722 | + | |
3723 | 3723 | | |
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | 3727 | | |
3728 | | - | |
3729 | | - | |
| 3728 | + | |
| 3729 | + | |
3730 | 3730 | | |
3731 | 3731 | | |
3732 | 3732 | | |
| |||
0 commit comments