aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2022-11-07 10:07:53 +0100
committerGreg Kroah-Hartman <[email protected]>2022-11-08 16:39:56 +0100
commitcd136706b4f925aa5d316642543babac90d45910 (patch)
treea102bfc0534d24a190ce9f9fddeddade6b28dfba /lib/mpi/mpi-sub-ui.c
parent30a0b95b1335e12efef89dd78518ed3e4a71a763 (diff)
USB: bcma: Make GPIO explicitly optional
What the code does is to not check the return value from devm_gpiod_get() and then avoid using an erroneous GPIO descriptor with IS_ERR_OR_NULL(). This will miss real errors from the GPIO core that should not be ignored, such as probe deferral. Instead request the GPIO as explicitly optional, which means that if it doesn't exist, the descriptor returned will be NULL. Then we can add error handling and also avoid just doing this on the device tree path, and simplify the site where the optional GPIO descriptor is used. There were some problems with cleaning up this GPIO descriptor use in the past, but this is the proper way to deal with it. Cc: Rafał Miłecki <[email protected]> Cc: Chuhong Yuan <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions