]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regulator: Call of_node_put() only once in rzg2l_usb_vbus_regulator_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 24 Sep 2024 11:21:52 +0000 (13:21 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 29 Sep 2024 23:11:43 +0000 (01:11 +0200)
commit7368e9f4e25bea507895bf194bd1c72d693840b2
tree1174926f6c46963f591f96c9957d2fcd2e8f40d8
parentf4e06afb0b47eb8ef6aa42eb8df2adb73b397bf7
regulator: Call of_node_put() only once in rzg2l_usb_vbus_regulator_probe()

An of_node_put(config.of_node) call was immediately used after a pointer
check for a devm_regulator_register() call in this function implementation.
Thus call such a function only once instead directly before the check.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/f9d7a026-a67a-4164-80f4-578b1fbf71ac@web.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/renesas-usb-vbus-regulator.c