[PATCH] i2c: microchip: pci1xxxx: Use signed variable

From: Muhammad Usama Anjum
Date: Tue Oct 04 2022 - 03:26:36 EST


Use signed variable to store the negative values correctly to compare
them later with negative values.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>
---
drivers/i2c/busses/i2c-mchp-pci1xxxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
index b2b7dbff5ef4..f3c497391d13 100644
--- a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+++ b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
@@ -708,7 +708,7 @@ static void pci1xxxx_i2c_init(struct pci1xxxx_i2c *i2c)
void __iomem *p2 = i2c->i2c_base + SMBUS_STATUS_REG_OFF;
void __iomem *p1 = i2c->i2c_base + SMB_GPR_REG;
u8 regval;
- u8 ret;
+ s8 ret;

ret = set_sys_lock(i2c);
if (ret == -EPERM) {
--
2.30.2