summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/ptn3460
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-12-15 15:35:35 +0100
committerFred Reitberger <reitbergerfred@gmail.com>2022-12-16 15:33:00 +0000
commit76364fb66b0cff510659f4051b6431174860cec7 (patch)
tree02081277d291435e1b3c399ea07b64874be92e9c /src/drivers/i2c/ptn3460
parentd832bda32bd54b65c41db4ae945fb6a993ca055b (diff)
drivers/i2c/designware/dw_i2c: handle bus < 0 in dw_i2c_dev_transfer
dw_i2c_soc_dev_to_bus will return -1 if it failed to find an I2C bus number for a device. In this case return -1 instead of implicitly casting the -1 to an unsigned int and passing that as bus number to dw_i2c_transfer. The dw_i2c_base_address call inside _dw_i2c_transfer already ended up handling this error case correctly, but better handle the error more directly. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I06b6005cee0c5c43855cb5b388a9911fc286c984 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70828 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/drivers/i2c/ptn3460')
0 files changed, 0 insertions, 0 deletions