Skip to content

Commit c94fce3

Browse files
mmindlag-linaro
authored andcommitted
mfd: qnap-mcu: Use EPROTO in stead of EIO on checksum errors
EPROTO stands for protocol error and a lot of driver already use it to designate errors in the sent or received data from a peripheral. So use it in the qnap-mcu as well for checksum errors. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20251113165218.449616-3-heiko@sntech.de Signed-off-by: Lee Jones <lee@kernel.org>
1 parent b488107 commit c94fce3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mfd/qnap-mcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ int qnap_mcu_exec(struct qnap_mcu *mcu,
178178
crc = qnap_mcu_csum(rx, reply->received - QNAP_MCU_CHECKSUM_SIZE);
179179
if (crc != rx[reply->received - QNAP_MCU_CHECKSUM_SIZE]) {
180180
dev_err(&mcu->serdev->dev, "Invalid Checksum received\n");
181-
return -EIO;
181+
return -EPROTO;
182182
}
183183

184184
memcpy(reply_data, rx, reply_data_size);

0 commit comments

Comments
 (0)