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
d53e22b2
Commit
d53e22b2
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr depca] fix leaks on error
parent
f5d1862d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
drivers/net/depca.c
drivers/net/depca.c
+11
-9
No files found.
drivers/net/depca.c
View file @
d53e22b2
...
...
@@ -681,8 +681,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
lp
->
sh_mem
=
ioremap
(
mem_start
,
mem_len
);
if
(
lp
->
sh_mem
==
NULL
)
{
printk
(
KERN_ERR
"depca: cannot remap ISA memory, aborting
\n
"
);
release_mem_region
(
mem_start
,
mem_len
);
goto
out_priv
;
goto
out1
;
}
lp
->
mem_start
=
mem_start
;
...
...
@@ -771,7 +770,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
status
=
-
ENXIO
;
if
(
!
irqnum
)
{
printk
(
" and failed to detect IRQ line.
\n
"
);
goto
out
_priv
;
goto
out
2
;
}
else
{
for
(
dev
->
irq
=
0
,
i
=
0
;
(
depca_irq
[
i
])
&&
(
!
dev
->
irq
);
i
++
)
if
(
irqnum
==
depca_irq
[
i
])
{
...
...
@@ -781,7 +780,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
if
(
!
dev
->
irq
)
{
printk
(
" but incorrect IRQ line detected.
\n
"
);
return
-
ENXIO
;
goto
out2
;
}
}
}
else
{
...
...
@@ -807,11 +806,14 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
device
->
driver_data
=
dev
;
SET_NETDEV_DEV
(
dev
,
device
);
register_netdev
(
dev
);
return
0
;
out_priv:
status
=
register_netdev
(
dev
);
if
(
status
==
0
)
return
0
;
out2:
iounmap
(
lp
->
sh_mem
);
out1:
release_mem_region
(
mem_start
,
mem_len
);
out_priv:
return
status
;
}
...
...
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