]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (chipcap2) Drop cc2_disable() in the probe and return dev_err_probe()
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Mon, 12 Aug 2024 22:59:53 +0000 (00:59 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 27 Aug 2024 15:10:23 +0000 (08:10 -0700)
commitf775f6d17035408be4a4b30c55d812fb7e6aab57
treed3f3ffab27c8f798fe274c732bf2084d326eeb9a
parent05aa8cbeabc07b07ff7f035e9b848aa008b831ee
hwmon: (chipcap2) Drop cc2_disable() in the probe and return dev_err_probe()

There is no need to actively disable a regulator that has not been
enabled by the driver, which makes the call to cc2_disable() in the
probe function meaningless, because the probe function never enables
the device's dedicated regulator.

Once the call to cc2_disable() is dropped, the error paths can directly
return dev_err_probe() in all cases.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Message-ID: <20240813-chipcap2-probe-improvements-v2-1-e9a2932a8a00@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/chipcap2.c