WSL2-Linux-Kernel/drivers/nfc
Paul Geurts 55da4788ce NFC: trf7970a: disable all regulators on removal
[ Upstream commit 6bea4f03c6a4e973ef369e15aac88f37981db49e ]

During module probe, regulator 'vin' and 'vdd-io' are used and enabled,
but the vdd-io regulator overwrites the 'vin' regulator pointer. During
remove, only the vdd-io is disabled, as the vin regulator pointer is not
available anymore. When regulator_put() is called during resource
cleanup a kernel warning is given, as the regulator is still enabled.

Store the two regulators in separate pointers and disable both the
regulators on module remove.

Fixes: 49d22c70aa ("NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage")
Signed-off-by: Paul Geurts <paul_geurts@live.nl>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/DB7PR09MB26847A4EBF88D9EDFEB1DA0F950E2@DB7PR09MB2684.eurprd09.prod.outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:24:45 +02:00
..
fdp nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties 2023-03-17 08:48:53 +01:00
microread nfc: microread: remove unused header includes 2021-08-26 09:13:35 +01:00
nfcmrvl nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 18:15:28 +01:00
nxp-nci nfc: nxp-nci: Fix potential memory leak in nxp_nci_send() 2022-11-10 18:15:27 +01:00
pn533 nfc: pn533: initialize struct pn533_out_arg properly 2023-03-22 13:31:24 +01:00
pn544 nfc: pn544: remove unused header includes 2021-08-26 09:13:36 +01:00
s3fwrn5 nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send() 2022-11-10 18:15:27 +01:00
st-nci nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:31:26 +01:00
st21nfca nfc: fix memory leak of se_io context in nfc_genl_se_io 2023-03-11 13:57:29 +01:00
st95hf nfc: st95hf: Make spi remove() callback return zero 2021-10-20 14:41:20 +01:00
Kconfig
Makefile
mei_phy.c nfc: mei_phy: constify buffer passed to mei_nfc_send() 2021-07-29 12:28:02 +01:00
mei_phy.h
nfcsim.c nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:29:51 +02:00
port100.c NFC: port100: fix use-after-free in port100_send_complete 2022-03-16 14:23:39 +01:00
trf7970a.c NFC: trf7970a: disable all regulators on removal 2024-05-02 16:24:45 +02:00
virtual_ncidev.c nfc: virtual_ncidev: Fix memory leak in virtual_nci_send() 2022-11-03 23:59:16 +09:00