Commit 7e696b97 authored by Javier Carrasco's avatar Javier Carrasco Committed by Greg Kroah-Hartman
Browse files

wifi: brcmfmac: release 'root' node in all execution paths



commit 2e19a3b5 upstream.

The fixed patch introduced an additional condition to enter the scope
where the 'root' device_node is released (!settings->board_type,
currently 'err'), which avoid decrementing the refcount with a call to
of_node_put() if that second condition is not satisfied.

Move the call to of_node_put() to the point where 'root' is no longer
required to avoid leaking the resource if err is not zero.

Cc: stable@vger.kernel.org
Fixes: 7682de8b ("wifi: brcmfmac: of: Fetch Apple properties")
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241030-brcmfmac-of-cleanup-v1-1-0b90eefb4279@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c386fb76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment