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
parent
5a3955f360
commit
2061f7b042
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue