]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: tcan4x5x: fix power regulator retrieval during probe
authorBrett Werling <brett.werling@garmin.com>
Thu, 12 Jun 2025 19:18:25 +0000 (14:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:28 +0000 (11:07 +0100)
commit6cb91b73c5a0cece474e0adf985cc85327a48553
tree98fe21a0afa785083ae33e84aea555e9b033f4f0
parentbd0b6b9c6458aef73995401b78b78b7828e154eb
can: tcan4x5x: fix power regulator retrieval during probe

commit db22720545207f734aaa9d9f71637bfc8b0155e0 upstream.

Fixes the power regulator retrieval in tcan4x5x_can_probe() by ensuring
the regulator pointer is not set to NULL in the successful return from
devm_regulator_get_optional().

Fixes: 3814ca3a10be ("can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config")
Signed-off-by: Brett Werling <brett.werling@garmin.com>
Link: https://patch.msgid.link/20250612191825.3646364-1-brett.werling@garmin.com
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/m_can/tcan4x5x-core.c