diff options
| author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2026-03-10 16:01:35 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-11 15:16:07 +0300 |
| commit | 74093093aed200c027e0b4ffbcbc89bca593f74d (patch) | |
| tree | d69f97a1207612d840c9f0952c0e991a68e9ff4b /drivers/platform | |
| parent | 7426a424302230e2c5df705c971468e637f49e8a (diff) | |
| download | linux-74093093aed200c027e0b4ffbcbc89bca593f74d.tar.xz | |
platform/olpc: olpc-xo175-ec: Fix overflow error message to print inlen
[ Upstream commit 2061f7b042f88d372cca79615f8425f3564c0b40 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform')
| -rw-r--r-- | drivers/platform/olpc/olpc-xo175-ec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c index 4823bd2819f6..8ecb7048bcc4 100644 --- a/drivers/platform/olpc/olpc-xo175-ec.c +++ b/drivers/platform/olpc/olpc-xo175-ec.c @@ -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; } |
