[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1623036068-30668-1-git-send-email-zou_wei@huawei.com>
Date: Mon, 7 Jun 2021 11:21:08 +0800
From: Zou Wei <zou_wei@...wei.com>
To: <jdelvare@...e.com>
CC: <linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Zou Wei <zou_wei@...wei.com>
Subject: [PATCH -next] i2c: Fix missing pci_disable_device() on error in ali1535_setup()
Fix the missing pci_disable_device() before return
from ali1535_setup() in the error handling case.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zou Wei <zou_wei@...wei.com>
---
drivers/i2c/busses/i2c-ali1535.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
index fb93152..bdbaf79 100644
--- a/drivers/i2c/busses/i2c-ali1535.c
+++ b/drivers/i2c/busses/i2c-ali1535.c
@@ -206,6 +206,7 @@ static int ali1535_setup(struct pci_dev *dev)
exit_free:
release_region(ali1535_smba, ALI1535_SMB_IOSIZE);
exit:
+ pci_disable_device(dev);
return retval;
}
--
2.6.2
Powered by blists - more mailing lists