Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: inline i2c_check_functionality checks

Inline i2c_check_functionality() checks, since the function returns a
boolean status rather than an error code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260329163152.366356-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thorsten Blum and committed by
Mark Brown
1e28cdee ebbe5d95

+7 -12
+1 -2
sound/soc/codecs/aw87390.c
··· 544 544 const struct snd_soc_component_driver *priv; 545 545 int ret; 546 546 547 - ret = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C); 548 - if (!ret) 547 + if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) 549 548 return dev_err_probe(&i2c->dev, -ENXIO, "check_functionality failed\n"); 550 549 551 550 aw87390 = devm_kzalloc(&i2c->dev, sizeof(*aw87390), GFP_KERNEL);
+1 -2
sound/soc/codecs/aw88081.c
··· 1253 1253 struct aw88081 *aw88081; 1254 1254 int ret; 1255 1255 1256 - ret = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C); 1257 - if (!ret) 1256 + if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) 1258 1257 return dev_err_probe(&i2c->dev, -ENXIO, "check_functionality failed"); 1259 1258 1260 1259 aw88081 = devm_kzalloc(&i2c->dev, sizeof(*aw88081), GFP_KERNEL);
+1 -2
sound/soc/codecs/aw88261.c
··· 1242 1242 struct aw88261 *aw88261; 1243 1243 int ret; 1244 1244 1245 - ret = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C); 1246 - if (!ret) 1245 + if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) 1247 1246 return dev_err_probe(&i2c->dev, -ENXIO, "check_functionality failed"); 1248 1247 1249 1248 aw88261 = devm_kzalloc(&i2c->dev, sizeof(*aw88261), GFP_KERNEL);
+2 -4
sound/soc/codecs/max98390.c
··· 1015 1015 struct i2c_adapter *adapter = i2c->adapter; 1016 1016 struct gpio_desc *reset_gpio; 1017 1017 1018 - ret = i2c_check_functionality(adapter, 1019 - I2C_FUNC_SMBUS_BYTE 1020 - | I2C_FUNC_SMBUS_BYTE_DATA); 1021 - if (!ret) { 1018 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE | 1019 + I2C_FUNC_SMBUS_BYTE_DATA)) { 1022 1020 dev_err(&i2c->dev, "I2C check functionality failed\n"); 1023 1021 return -ENXIO; 1024 1022 }
+2 -2
sound/soc/codecs/max98520.c
··· 681 681 struct max98520_priv *max98520; 682 682 struct i2c_adapter *adapter = to_i2c_adapter(i2c->dev.parent); 683 683 684 - ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA); 685 - if (!ret) { 684 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE | 685 + I2C_FUNC_SMBUS_BYTE_DATA)) { 686 686 dev_err(&i2c->dev, "I2C check functionality failed\n"); 687 687 return -ENXIO; 688 688 }