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
32812cab
Commit
32812cab
authored
Oct 30, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] etherh: report errors when trying to parse MAC address.
parent
fb3e5c1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
drivers/net/arm/etherh.c
drivers/net/arm/etherh.c
+15
-1
No files found.
drivers/net/arm/etherh.c
View file @
32812cab
...
@@ -523,16 +523,30 @@ static int __init etherh_addr(char *addr, struct expansion_card *ec)
...
@@ -523,16 +523,30 @@ static int __init etherh_addr(char *addr, struct expansion_card *ec)
struct
in_chunk_dir
cd
;
struct
in_chunk_dir
cd
;
char
*
s
;
char
*
s
;
if
(
ecard_readchunk
(
&
cd
,
ec
,
0xf5
,
0
)
&&
(
s
=
strchr
(
cd
.
d
.
string
,
'('
)))
{
if
(
!
ecard_readchunk
(
&
cd
,
ec
,
0xf5
,
0
))
{
printk
(
KERN_ERR
"%s: unable to read podule description string
\n
"
,
ec
->
dev
.
bus_id
);
goto
no_addr
;
}
s
=
strchr
(
cd
.
d
.
string
,
'('
);
if
(
s
)
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
6
;
i
++
)
{
for
(
i
=
0
;
i
<
6
;
i
++
)
{
addr
[
i
]
=
simple_strtoul
(
s
+
1
,
&
s
,
0x10
);
addr
[
i
]
=
simple_strtoul
(
s
+
1
,
&
s
,
0x10
);
if
(
*
s
!=
(
i
==
5
?
')'
:
':'
))
if
(
*
s
!=
(
i
==
5
?
')'
:
':'
))
break
;
break
;
}
}
if
(
i
==
6
)
if
(
i
==
6
)
return
0
;
return
0
;
}
}
printk
(
KERN_ERR
"%s: unable to parse MAC address: %s
\n
"
,
ec
->
dev
.
bus_id
,
cd
.
d
.
string
);
no_addr:
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
...
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