Skip to content

Commit 82fa487

Browse files
aatoof1nashif
authored andcommitted
modbus: client: change 'EXNO' to '-EIO'
Fix error in Modbus client write response validation. Signed-off-by: Ahmad Atoof <[email protected]>
1 parent b41ea17 commit 82fa487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/modbus/modbus_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static int mbc_validate_wr_response(struct modbus_context *ctx,
227227
case MODBUS_FC15_COILS_WR:
228228
case MODBUS_FC16_HOLDING_REGS_WR:
229229
if (req_addr != resp_addr || req_value != resp_value) {
230-
err = ENXIO;
230+
err = -EIO;
231231
} else {
232232
err = 0;
233233
}

0 commit comments

Comments
 (0)