]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
can: hi311x: hi3110_open(): add check for hi3110_power_enable() return value
authorWenyuan Li <2063309626@qq.com>
Tue, 10 Mar 2026 05:08:44 +0000 (13:08 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 10 Mar 2026 10:12:52 +0000 (11:12 +0100)
commit47bba09b14fa21712398febf36cb14fd4fc3bded
tree5635a9fba66dc7cba582fc81e65cc454cd00da70
parent1eea46908c57abb7109b1fce024f366ae6c69c4f
can: hi311x: hi3110_open(): add check for hi3110_power_enable() return value

In hi3110_open(), the return value of hi3110_power_enable() is not checked.
If power enable fails, the device may not function correctly, while the
driver still returns success.

Add a check for the return value and propagate the error accordingly.

Signed-off-by: Wenyuan Li <2063309626@qq.com>
Link: https://patch.msgid.link/tencent_B5E2E7528BB28AA8A2A56E16C49BD58B8B07@qq.com
Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
[mkl: adjust subject, commit message and jump label]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/hi311x.c