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: 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>

authored by

Heiko Stuebner and committed by
Lee Jones
c94fce30 b4881070

+1 -1
+1 -1
drivers/mfd/qnap-mcu.c
··· 178 178 crc = qnap_mcu_csum(rx, reply->received - QNAP_MCU_CHECKSUM_SIZE); 179 179 if (crc != rx[reply->received - QNAP_MCU_CHECKSUM_SIZE]) { 180 180 dev_err(&mcu->serdev->dev, "Invalid Checksum received\n"); 181 - return -EIO; 181 + return -EPROTO; 182 182 } 183 183 184 184 memcpy(reply_data, rx, reply_data_size);