platform/olpc: olpc-xo175-ec: Fix overflow error message to print inlen

The command length check validates inlen (> 5), but the error message
incorrectly printed resp_len. Print inlen so the log reflects the
actual command length.

Fixes: 0c3d931b3a ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://patch.msgid.link/20260310130138.700687-1-alok.a.tiwari@oracle.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
master
Alok Tiwari 2026-03-10 06:01:35 -07:00 committed by Ilpo Järvinen
parent 5a3955f360
commit 2061f7b042
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp,
dev_dbg(dev, "CMD %x, %zd bytes expected\n", cmd, resp_len);
if (inlen > 5) {
dev_err(dev, "command len %zd too big!\n", resp_len);
dev_err(dev, "command len %zd too big!\n", inlen);
return -EOVERFLOW;
}