[PATCH 3/3] i2c: rzv2m: Disable the operation of unit in case of error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The remove and suspend callbacks disable the operation of the unit.
Do the same in probe() in case of error.

Reported-by: Pavel Machek <pavel@xxxxxxx>
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-rzv2m.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
index ccd337f2e8c3..3e9fc269e4fd 100644
--- a/drivers/i2c/busses/i2c-rzv2m.c
+++ b/drivers/i2c/busses/i2c-rzv2m.c
@@ -454,8 +454,10 @@ static int rzv2m_i2c_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, priv);
 
 	ret = i2c_add_numbered_adapter(adap);
-	if (ret < 0)
+	if (ret < 0) {
+		BIT_CLRL(priv->base + IICB0CTL0, IICB0IICE);
 		pm_runtime_disable(dev);
+	}
 
 	return ret;
 }
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux