Unverified Commit 2061f7b0 authored by Alok Tiwari's avatar Alok Tiwari Committed by Ilpo Järvinen
Browse files

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: 0c3d931b ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Link: https://patch.msgid.link/20260310130138.700687-1-alok.a.tiwari@oracle.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 5a3955f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}