[SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: i2c-mlxbf.c: fix wrong variable name

Asmaa Mnebhi asmaa at nvidia.com
Wed Jul 20 13:34:09 UTC 2022


Buglink: https://bugs.launchpad.net/bugs/1982357

We are using the wrong variable name priv->smbus->io instead of
priv->mst_cause->io. This could result in unexpected i2c behavior.

Signed-off-by: Asmaa Mnebhi <asmaa at nvidia.com>
---
 drivers/i2c/busses/i2c-mlxbf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index b951443b91f8..971ed57569f9 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -724,7 +724,7 @@ static int mlx_smbus_enable(struct mlx_i2c_priv *priv, u8 slave,
 	/* Clear status bits  */
 	smbus_write(priv->smbus->io, SMBUS_MASTER_STATUS, 0x0);
 	/* Set the cause data */
-	smbus_write(priv->smbus->io, I2C_CAUSE_OR_CLEAR_BITS, ~0x0);
+	smbus_write(priv->mst_cause->io, I2C_CAUSE_OR_CLEAR_BITS, ~0x0);
 	/* Zero PEC byte */
 	smbus_write(priv->smbus->io, SMBUS_MASTER_PEC, 0x0);
 	/* Zero byte count    */
-- 
2.30.1




More information about the kernel-team mailing list