Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: qnap-mcu: Handle errors returned from qnap_mcu_write

qnap_mcu_write can return errors and those were not checked before.
So do that now.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250804130726.3180806-3-heiko@sntech.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Heiko Stuebner and committed by
Lee Jones
bf2de430 5e1c8867

+5 -1
+5 -1
drivers/mfd/qnap-mcu.c
··· 163 163 reply->received = 0; 164 164 reinit_completion(&reply->done); 165 165 166 - qnap_mcu_write(mcu, cmd_data, cmd_data_size); 166 + ret = qnap_mcu_write(mcu, cmd_data, cmd_data_size); 167 + if (ret < 0) { 168 + mutex_unlock(&mcu->bus_lock); 169 + return ret; 170 + } 167 171 168 172 serdev_device_wait_until_sent(mcu->serdev, msecs_to_jiffies(QNAP_MCU_TIMEOUT_MS)); 169 173