Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
9d5b3ffc
Commit
9d5b3ffc
authored
Feb 07, 2008
by
Dave Airlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm: fixup some of the ioctl function exit paths
Signed-off-by:
Dave Airlie
<
airlied@linux.ie
>
parent
19a8f59a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
drivers/char/drm/drm_drv.c
drivers/char/drm/drm_drv.c
+7
-5
No files found.
drivers/char/drm/drm_drv.c
View file @
9d5b3ffc
...
...
@@ -495,23 +495,25 @@ int drm_ioctl(struct inode *inode, struct file *filp,
}
else
{
if
(
cmd
&
(
IOC_IN
|
IOC_OUT
))
{
kdata
=
kmalloc
(
_IOC_SIZE
(
cmd
),
GFP_KERNEL
);
if
(
!
kdata
)
return
-
ENOMEM
;
if
(
!
kdata
)
{
retcode
=
-
ENOMEM
;
goto
err_i1
;
}
}
if
(
cmd
&
IOC_IN
)
{
if
(
copy_from_user
(
kdata
,
(
void
__user
*
)
arg
,
_IOC_SIZE
(
cmd
))
!=
0
)
{
retcode
=
-
E
ACCES
;
retcode
=
-
E
FAULT
;
goto
err_i1
;
}
}
retcode
=
func
(
dev
,
kdata
,
file_priv
);
if
(
cmd
&
IOC_OUT
)
{
if
(
(
retcode
==
0
)
&&
(
cmd
&
IOC_OUT
)
)
{
if
(
copy_to_user
((
void
__user
*
)
arg
,
kdata
,
_IOC_SIZE
(
cmd
))
!=
0
)
retcode
=
-
E
ACCES
;
retcode
=
-
E
FAULT
;
}
}
...
...
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