diff options
author | Nico Huber <nico.h@gmx.de> | 2022-08-01 20:23:13 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-08-03 20:55:14 +0000 |
commit | ee443c8d3e7cf6edbc20c6a2322df31001ff84c7 (patch) | |
tree | 2aaa9e975ebb55c2621d1e445da2521e059c549b /src/drivers/i2c/cs42l42 | |
parent | 51a35764b31d987b624c60dab7a86b355998a184 (diff) |
drivers/i2c/dw_i2c: Re-add check for empty i2c transfer list
The check was recently removed to allow callers to pass `count == 0`.
Dereferencing the `msg` array is invalid in that case, though. Linux,
where we borrowed the i2c interface from, also treats this with -EINVAL.
Change-Id: I1eec02dd3a3fcf2d477a62cc65292fca40e469d3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Diffstat (limited to 'src/drivers/i2c/cs42l42')
0 files changed, 0 insertions, 0 deletions