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
nexedi
linux
Commits
c372d43a
Commit
c372d43a
authored
May 06, 2002
by
Dave Jones
Committed by
Linus Torvalds
May 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] check various return codes in advantechwdt.
Adds missing checks. Probably another from William Stinson
parent
0099be84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
drivers/char/advantechwdt.c
drivers/char/advantechwdt.c
+13
-3
No files found.
drivers/char/advantechwdt.c
View file @
c372d43a
...
...
@@ -241,11 +241,21 @@ advwdt_init(void)
advwdt_validate_timeout
();
spin_lock_init
(
&
advwdt_lock
);
misc_register
(
&
advwdt_miscdev
);
if
(
misc_register
(
&
advwdt_miscdev
))
return
-
ENODEV
;
#if WDT_START != WDT_STOP
request_region
(
WDT_STOP
,
1
,
"Advantech WDT"
);
if
(
!
request_region
(
WDT_STOP
,
1
,
"Advantech WDT"
))
{
misc_deregister
(
&
advwdt_miscdev
);
return
-
EIO
;
}
#endif
if
(
!
request_region
(
WDT_START
,
1
,
"Advantech WDT"
))
{
misc_deregister
(
&
advwdt_miscdev
);
#if WDT_START != WDT_STOP
release_region
(
WDT_STOP
,
1
);
#endif
request_region
(
WDT_START
,
1
,
"Advantech WDT"
);
return
-
EIO
;
}
register_reboot_notifier
(
&
advwdt_notifier
);
return
0
;
}
...
...
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