aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2023-07-04 17:09:09 +0300
committerGreg Kroah-Hartman <[email protected]>2023-07-25 17:44:37 +0200
commita8291be6b5dd465c22af229483dbac543a91e24e (patch)
tree506bf6c8082ca78a0639bf6ffde7e1354b459b86 /lib/test_fortify/write_overflow-strncpy-src.c
parent288b4fa1798e3637a9304c6e90a93d900e02369c (diff)
Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()"
This reverts commit f08aa7c80dac27ee00fa6827f447597d2fba5465. 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 <[email protected]> Fixes: f08aa7c80dac ("usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()") Cc: stable <[email protected]> Link: https://lore.kernel.org/r/ZKQoBa84U/ykEh3C@moroto Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions