Skip to content

Commit 2061f7b

Browse files
aloktiwaij-intel
authored andcommitted
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: 0c3d931 ("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>
1 parent 5a3955f commit 2061f7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/olpc/olpc-xo175-ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp,
482482
dev_dbg(dev, "CMD %x, %zd bytes expected\n", cmd, resp_len);
483483

484484
if (inlen > 5) {
485-
dev_err(dev, "command len %zd too big!\n", resp_len);
485+
dev_err(dev, "command len %zd too big!\n", inlen);
486486
return -EOVERFLOW;
487487
}
488488

0 commit comments

Comments
 (0)