Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
b162d34d
Commit
b162d34d
authored
14 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Fixed NULL pointer dereference on request error in RTAI example.
parent
99e0c9ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtai/rtai_sample.c
+4
-4
4 additions, 4 deletions
examples/rtai/rtai_sample.c
with
4 additions
and
4 deletions
examples/rtai/rtai_sample.c
+
4
−
4
View file @
b162d34d
...
@@ -76,8 +76,8 @@ static cycles_t t_last_cycle = 0, t_critical;
...
@@ -76,8 +76,8 @@ static cycles_t t_last_cycle = 0, t_critical;
// process data
// process data
static
uint8_t
*
domain1_pd
;
// process data memory
static
uint8_t
*
domain1_pd
;
// process data memory
#define AnaInSlavePos 0,
1
#define AnaInSlavePos 0,
3
#define DigOutSlavePos 0,
3
#define DigOutSlavePos 0,
2
#define Beckhoff_EL2004 0x00000002, 0x07D43052
#define Beckhoff_EL2004 0x00000002, 0x07D43052
#define Beckhoff_EL3162 0x00000002, 0x0C5A3052
#define Beckhoff_EL3162 0x00000002, 0x0C5A3052
...
@@ -286,8 +286,8 @@ int __init init_mod(void)
...
@@ -286,8 +286,8 @@ int __init init_mod(void)
t_critical
=
cpu_khz
*
1000
/
FREQUENCY
-
cpu_khz
*
INHIBIT_TIME
/
1000
;
t_critical
=
cpu_khz
*
1000
/
FREQUENCY
-
cpu_khz
*
INHIBIT_TIME
/
1000
;
master
=
ecrt_request_master
(
0
);
master
=
ecrt_request_master
(
0
);
if
(
IS_ERR
(
master
)
)
{
if
(
!
master
)
{
ret
=
PTR_ERR
(
master
)
;
ret
=
-
EBUSY
;
printk
(
KERN_ERR
PFX
"Requesting master 0 failed!
\n
"
);
printk
(
KERN_ERR
PFX
"Requesting master 0 failed!
\n
"
);
goto
out_return
;
goto
out_return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment