Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 0c3d931b3ab9e ("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>

authored by

Alok Tiwari and committed by
Ilpo Järvinen
2061f7b0 5a3955f3

+1 -1
+1 -1
drivers/platform/olpc/olpc-xo175-ec.c
··· 482 482 dev_dbg(dev, "CMD %x, %zd bytes expected\n", cmd, resp_len); 483 483 484 484 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); 486 486 return -EOVERFLOW; 487 487 } 488 488