summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorMyeonghun Pak <mhun512@gmail.com>2026-09-13 00:26:25 -0400
committerDavid Heidelberg <david@ixit.cz>2026-09-23 22:13:17 +0200
commitd2acbde7e67df44efa8f0963462d1192e7694ffc (patch)
tree050dd63585a716be4e9f80f88d515c585f0e578e /include/net
parent66f4300206b82b0b143ef0d9be90cd8d29f23a47 (diff)
downloadlinux-d2acbde7e67df44efa8f0963462d1192e7694ffc.tar.gz
linux-d2acbde7e67df44efa8f0963462d1192e7694ffc.zip
nfc: trf7970a: power down on startup RX gain failure
trf7970a_startup() powers up the device before applying the optional RX gain reduction. If the register read or write fails, it returns without undoing that power-up. Probe's unwind only drops the separate regulator references acquired by probe, leaving the additional VIN enable from startup unbalanced. The system resume caller also has no power-down on this error. Call trf7970a_power_down() before returning the RX gain error to deassert the enable GPIOs, release the startup VIN reference and restore the powered-off state. Runtime PM has not been enabled yet, so the full shutdown helper is not appropriate here. Preserve the original SPI error. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 5d69351820ea ("NFC: trf7970a: Create device-tree parameter for RX gain reduction") Cc: stable@vger.kernel.org Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Reviewed-by: Paul Geurts <paul.geurts@prodrive-technologies.com> Link: https://patch.msgid.link/20260913042625.31296-1-mhun512@gmail.com Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions