diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-01-21 21:08:19 +0800 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@kernel.org> | 2026-03-07 19:49:52 +0000 |
| commit | 879c001afbac3df94160334fe5117c0c83b2cf48 (patch) | |
| tree | b1a97a1fd3d2c1c7bacc621d29e09c25daaf489f /include/linux/socket.h | |
| parent | 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff) | |
firmware: arm_scpi: Fix device_node reference leak in probe path
A device_node reference obtained from the device tree is not released
on all error paths in the arm_scpi probe path. Specifically, a node
returned by of_parse_phandle() could be leaked when the probe failed
after the node was acquired. The probe function returns early and
the shmem reference is not released.
Use __free(device_node) scope-based cleanup to automatically release
the reference when the variable goes out of scope.
Fixes: ed7ecb883901 ("firmware: arm_scpi: Add compatibility checks for shmem node")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Message-Id: <20260121-arm_scpi_2-v2-1-702d7fa84acb@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Diffstat (limited to 'include/linux/socket.h')
0 files changed, 0 insertions, 0 deletions
