i2c: tegra: check msg length in SMBUS block read
authorAkhil R <akhilrajeev@nvidia.com>
Thu, 24 Apr 2025 05:33:20 +0000 (11:03 +0530)
committerAndi Shyti <andi@smida.it>
Mon, 19 May 2025 20:23:57 +0000 (22:23 +0200)
commita6e04f05ce0b070ab39d5775580e65c7d943da0b
tree639ec2b4510b46c49a459c0e6c15ea16854fa711
parent090c3a4a264bb6859b464379fa2cc9570139b456
i2c: tegra: check msg length in SMBUS block read

For SMBUS block read, do not continue to read if the message length
passed from the device is '0' or greater than the maximum allowed bytes.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250424053320.19211-1-akhilrajeev@nvidia.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-tegra.c