lkml.org 
[lkml]   [2021]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] i2c: Fix missing pci_disable_device() on error in ali1535_setup()
Date
Fix the missing pci_disable_device() before return
from ali1535_setup() in the error handling case.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.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
\
 
 \ /
  Last update: 2021-06-07 05:03    [W:0.051 / U:2.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site