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
056a8763
Commit
056a8763
authored
Jul 22, 2005
by
Russell King
Committed by
Russell King
Jul 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Serial: No need to check for priv != NULL in remove_one
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
fbc0dc0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
drivers/serial/8250_pci.c
drivers/serial/8250_pci.c
+17
-20
No files found.
drivers/serial/8250_pci.c
View file @
056a8763
...
@@ -1766,33 +1766,30 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
...
@@ -1766,33 +1766,30 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
static
void
__devexit
pciserial_remove_one
(
struct
pci_dev
*
dev
)
static
void
__devexit
pciserial_remove_one
(
struct
pci_dev
*
dev
)
{
{
struct
serial_private
*
priv
=
pci_get_drvdata
(
dev
);
struct
serial_private
*
priv
=
pci_get_drvdata
(
dev
);
struct
pci_serial_quirk
*
quirk
;
int
i
;
pci_set_drvdata
(
dev
,
NULL
);
pci_set_drvdata
(
dev
,
NULL
);
if
(
priv
)
{
for
(
i
=
0
;
i
<
priv
->
nr
;
i
++
)
struct
pci_serial_quirk
*
quirk
;
serial8250_unregister_port
(
priv
->
line
[
i
]);
int
i
;
for
(
i
=
0
;
i
<
priv
->
nr
;
i
++
)
serial8250_unregister_port
(
priv
->
line
[
i
]);
for
(
i
=
0
;
i
<
PCI_NUM_BAR_RESOURCES
;
i
++
)
{
for
(
i
=
0
;
i
<
PCI_NUM_BAR_RESOURCES
;
i
++
)
{
if
(
priv
->
remapped_bar
[
i
])
if
(
priv
->
remapped_bar
[
i
])
iounmap
(
priv
->
remapped_bar
[
i
]);
iounmap
(
priv
->
remapped_bar
[
i
]);
priv
->
remapped_bar
[
i
]
=
NULL
;
priv
->
remapped_bar
[
i
]
=
NULL
;
}
}
/*
/*
* Find the exit quirks.
* Find the exit quirks.
*/
*/
quirk
=
find_quirk
(
dev
);
quirk
=
find_quirk
(
dev
);
if
(
quirk
->
exit
)
if
(
quirk
->
exit
)
quirk
->
exit
(
dev
);
quirk
->
exit
(
dev
);
pci_disable_device
(
dev
);
pci_disable_device
(
dev
);
kfree
(
priv
);
kfree
(
priv
);
}
}
}
static
int
pciserial_suspend_one
(
struct
pci_dev
*
dev
,
pm_message_t
state
)
static
int
pciserial_suspend_one
(
struct
pci_dev
*
dev
,
pm_message_t
state
)
...
...
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