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>
This commit is contained in:
parent
5e1c886791
commit
bf2de43060
@ -163,7 +163,11 @@ int qnap_mcu_exec(struct qnap_mcu *mcu,
|
||||
reply->received = 0;
|
||||
reinit_completion(&reply->done);
|
||||
|
||||
qnap_mcu_write(mcu, cmd_data, cmd_data_size);
|
||||
ret = qnap_mcu_write(mcu, cmd_data, cmd_data_size);
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&mcu->bus_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
serdev_device_wait_until_sent(mcu->serdev, msecs_to_jiffies(QNAP_MCU_TIMEOUT_MS));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user