Commit 97ca843f authored by Jean Delvare's avatar Jean Delvare Committed by Wolfram Sang
Browse files

i2c: dev: Check for I2C_FUNC_I2C before calling i2c_transfer



It is good practice to check that the underlying adapter supports
I2C transfers before attempting them. The i2c core would eventually
return an error, but it's more efficient to fail early.

Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
parent d08ed106
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment