* [PATCH] mfd: menf21bmc: inline i2c_check_functionality check
@ 2026-04-28 16:58 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-04-28 16:58 UTC (permalink / raw)
To: Andreas Werner, Lee Jones; +Cc: Thorsten Blum, linux-kernel
Inline the i2c_check_functionality() check, since the function returns a
boolean status rather than an error code.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/mfd/menf21bmc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/menf21bmc.c b/drivers/mfd/menf21bmc.c
index 1d36095155e0..0f24de516d72 100644
--- a/drivers/mfd/menf21bmc.c
+++ b/drivers/mfd/menf21bmc.c
@@ -54,11 +54,9 @@ menf21bmc_probe(struct i2c_client *client)
int rev_major, rev_minor, rev_main;
int ret;
- ret = i2c_check_functionality(client->adapter,
- I2C_FUNC_SMBUS_BYTE_DATA |
- I2C_FUNC_SMBUS_WORD_DATA |
- I2C_FUNC_SMBUS_BYTE);
- if (!ret)
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA |
+ I2C_FUNC_SMBUS_WORD_DATA |
+ I2C_FUNC_SMBUS_BYTE))
return -ENODEV;
rev_major = i2c_smbus_read_word_data(client, BMC_CMD_REV_MAJOR);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-28 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 16:58 [PATCH] mfd: menf21bmc: inline i2c_check_functionality check Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox