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
70b30239
Commit
70b30239
authored
Oct 17, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Missing checks in sis drm
parent
fe4d8100
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
drivers/char/drm/sis_ds.c
drivers/char/drm/sis_ds.c
+12
-10
No files found.
drivers/char/drm/sis_ds.c
View file @
70b30239
...
...
@@ -50,15 +50,16 @@ set_t *setInit(void)
set_t
*
set
;
set
=
(
set_t
*
)
MALLOC
(
sizeof
(
set_t
));
for
(
i
=
0
;
i
<
SET_SIZE
;
i
++
){
set
->
list
[
i
].
free_next
=
i
+
1
;
set
->
list
[
i
].
alloc_next
=
-
1
;
}
set
->
list
[
SET_SIZE
-
1
].
free_next
=
-
1
;
set
->
free
=
0
;
set
->
alloc
=
-
1
;
set
->
trace
=
-
1
;
if
(
set
)
{
for
(
i
=
0
;
i
<
SET_SIZE
;
i
++
){
set
->
list
[
i
].
free_next
=
i
+
1
;
set
->
list
[
i
].
alloc_next
=
-
1
;
}
set
->
list
[
SET_SIZE
-
1
].
free_next
=
-
1
;
set
->
free
=
0
;
set
->
alloc
=
-
1
;
set
->
trace
=
-
1
;
}
return
set
;
}
...
...
@@ -172,7 +173,8 @@ static void *calloc(size_t nmemb, size_t size)
{
void
*
addr
;
addr
=
kmalloc
(
nmemb
*
size
,
GFP_KERNEL
);
memset
(
addr
,
0
,
nmemb
*
size
);
if
(
addr
)
memset
(
addr
,
0
,
nmemb
*
size
);
return
addr
;
}
#define free(n) kfree(n)
...
...
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