aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2024-10-10 20:06:18 +0200
committerRafael J. Wysocki <[email protected]>2024-11-26 13:28:43 +0100
commita094ccfa5277cb9b92040016f3abf22408405820 (patch)
tree15b19597fbc1f850c8d0f9a8585ced362ffc4e6d /drivers/fpga/fpga-mgr.c
parent69f3aa6ad92447d6e9f50c5b5aea85b56e80b198 (diff)
thermal: of: Use scoped memory and OF handling to simplify thermal_of_trips_init()
Obtain the device node reference and allocate memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. The code is not equivalent in one minor aspect: outgoing parameter "*ntrips" will not be zeroed on errors of memory allocation. This difference is not important, because code was already not zeroing it in case of earlier errors and the only caller does not rely on ntrips being 0 in case of errors. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://patch.msgid.link/20241010-b4-cleanup-h-of-node-put-thermal-v4-2-bfbe29ad81f4@linaro.org [ rjw: Rebase ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions