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
6a3c9612
Commit
6a3c9612
authored
Jul 29, 2002
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL] Add pci_disable_device() to initialisation failure paths.
parent
b3a1d183
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
drivers/serial/8250_pci.c
drivers/serial/8250_pci.c
+7
-3
No files found.
drivers/serial/8250_pci.c
View file @
6a3c9612
...
...
@@ -636,9 +636,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
return
rc
;
if
(
ent
->
driver_data
==
pbn_default
&&
serial_pci_guess_board
(
dev
,
board
))
serial_pci_guess_board
(
dev
,
board
))
{
pci_disable_device
(
dev
);
return
-
ENODEV
;
else
if
(
serial_pci_guess_board
(
dev
,
&
tmp
)
==
0
)
{
}
else
if
(
serial_pci_guess_board
(
dev
,
&
tmp
)
==
0
)
{
printk
(
KERN_INFO
"Redundant entry in serial pci_table. "
"Please send the output of
\n
"
"lspci -vv, this message (%d,%d,%d,%d)
\n
"
...
...
@@ -652,8 +653,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
priv
=
kmalloc
(
sizeof
(
struct
serial_private
)
+
sizeof
(
unsigned
int
)
*
board
->
num_ports
,
GFP_KERNEL
);
if
(
!
priv
)
if
(
!
priv
)
{
pci_disable_device
(
dev
);
return
-
ENOMEM
;
}
/*
* Run the initialization function, if any
...
...
@@ -661,6 +664,7 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
if
(
board
->
init_fn
)
{
rc
=
board
->
init_fn
(
dev
,
board
,
1
);
if
(
rc
!=
0
)
{
pci_disable_device
(
dev
);
kfree
(
priv
);
return
rc
;
}
...
...
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