Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3f090446
Commit
3f090446
authored
Jun 17, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I2C: fix resource leak in i2c-ali15x3.c
parent
488d6882
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-ali15x3.c
+11
-7
No files found.
drivers/i2c/busses/i2c-ali15x3.c
View file @
3f090446
...
...
@@ -177,17 +177,18 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
if
(
force_addr
)
{
dev_info
(
&
ALI15X3_dev
->
dev
,
"forcing ISA address 0x%04X
\n
"
,
ali15x3_smba
);
if
(
PCIBIOS_SUCCESSFUL
!=
pci_write_config_word
(
ALI15X3_dev
,
SMBBA
,
ali15x3_smba
))
return
-
ENODEV
;
if
(
PCIBIOS_SUCCESSFUL
!=
pci_read_config_word
(
ALI15X3_dev
,
SMBBA
,
&
a
))
return
-
ENODEV
;
if
(
PCIBIOS_SUCCESSFUL
!=
pci_write_config_word
(
ALI15X3_dev
,
SMBBA
,
ali15x3_smba
))
goto
error
;
if
(
PCIBIOS_SUCCESSFUL
!=
pci_read_config_word
(
ALI15X3_dev
,
SMBBA
,
&
a
))
goto
error
;
if
((
a
&
~
(
ALI15X3_SMB_IOSIZE
-
1
))
!=
ali15x3_smba
)
{
/* make sure it works */
dev_err
(
&
ALI15X3_dev
->
dev
,
"force address failed - not supported?
\n
"
);
return
-
ENODEV
;
goto
error
;
}
}
/* check if whole device is enabled */
...
...
@@ -219,6 +220,9 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
dev_dbg
(
&
ALI15X3_dev
->
dev
,
"iALI15X3_smba = 0x%X
\n
"
,
ali15x3_smba
);
return
0
;
error:
release_region
(
ali15x3_smba
,
ALI15X3_SMB_IOSIZE
);
return
-
ENODEV
;
}
/* Internally used pause function */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment