mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mfd: menf21bmc: inline i2c_check_functionality check
@ 2026-04-28 16:58 Thorsten Blum
  2026-05-07 13:47 ` Lee Jones
  2026-05-14 13:22 ` (subset) " Lee Jones
  0 siblings, 2 replies; 4+ messages 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	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-14 13:22 UTC | newest]

Thread overview: 4+ messages (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
2026-05-07 13:47 ` Lee Jones
2026-05-07 14:14   ` Thorsten Blum
2026-05-14 13:22 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®