diff options
| author | Sasha Levin <sashal@kernel.org> | 2026-11-09 08:47:08 -0500 |
|---|---|---|
| committer | Krzysztof Kozlowski <krzk@kernel.org> | 2026-11-11 16:22:36 +0100 |
| commit | 1a509eca07176bc3363031c030d038ca9be9dfc0 (patch) | |
| tree | ebf08c4e93c6d795ff6737a2081e256e4807bbf0 /tools/perf/scripts | |
| parent | a78ee2e05f7c7dd09e58ea615960105f78dc3c75 (diff) | |
memory: fsl_ifc: Do not dereference the unset global pointer in probe
Commit a78ee2e05f7c ("memory: fsl_ifc: Clear fsl_ifc_ctrl_dev on probe failure
and removal") assigns fsl_ifc_ctrl_dev near the end of probe, but probe still
reads the IFC revision and fsl_ifc_ctrl_init() still programs the event
registers before that. Both go through ifc_in32() and ifc_out32(), which take
the register endianness from fsl_ifc_ctrl_dev, so the first probe dereferences
a NULL pointer.
Use local accessors that take the endianness from the controller being probed
for these register accesses.
Fixes: a78ee2e05f7c ("memory: fsl_ifc: Clear fsl_ifc_ctrl_dev on probe failure and removal")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://patch.msgid.link/20261109134708.263012-1-sashal@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
