Commit 9c41f371 authored by Javier Carrasco's avatar Javier Carrasco Committed by Tzung-Bi Shih
Browse files

platform/chrome: cros_ec_typec: fix missing fwnode reference decrement



The device_for_each_child_node() macro requires explicit calls to
fwnode_handle_put() upon early exits (return, break, goto) to decrement
the fwnode's refcount, and avoid levaing a node reference behind.

Add the missing fwnode_handle_put() after the common label for all error
paths.

Cc: stable@vger.kernel.org
Fixes: fdc6b21e ("platform/chrome: Add Type C connector class driver")
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241013-cross_ec_typec_fwnode_handle_put-v2-1-9182b2cd7767@gmail.com


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 7cbf2899
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment