projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e1c886
)
mfd: qnap-mcu: Handle errors returned from qnap_mcu_write
author
Heiko Stuebner
<heiko@sntech.de>
Mon, 4 Aug 2025 13:07:24 +0000
(15:07 +0200)
committer
Lee Jones
<lee@kernel.org>
Wed, 1 Oct 2025 09:28:14 +0000
(10:28 +0100)
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>
drivers/mfd/qnap-mcu.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/qnap-mcu.c
b/drivers/mfd/qnap-mcu.c
index
47d435c
..
e794efb
100644
(file)
--- a/
drivers/mfd/qnap-mcu.c
+++ b/
drivers/mfd/qnap-mcu.c
@@
-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));