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
1b38bed5
Commit
1b38bed5
authored
May 10, 2011
by
Sven Eckelmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
batman-adv: Use kzalloc rather than kmalloc followed by memset with 0
Signed-off-by:
Sven Eckelmann
<
sven@narfation.org
>
parent
e2cbc11c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
net/batman-adv/gateway_client.c
net/batman-adv/gateway_client.c
+1
-2
No files found.
net/batman-adv/gateway_client.c
View file @
1b38bed5
...
@@ -273,11 +273,10 @@ static void gw_node_add(struct bat_priv *bat_priv,
...
@@ -273,11 +273,10 @@ static void gw_node_add(struct bat_priv *bat_priv,
struct
gw_node
*
gw_node
;
struct
gw_node
*
gw_node
;
int
down
,
up
;
int
down
,
up
;
gw_node
=
k
m
alloc
(
sizeof
(
struct
gw_node
),
GFP_ATOMIC
);
gw_node
=
k
z
alloc
(
sizeof
(
struct
gw_node
),
GFP_ATOMIC
);
if
(
!
gw_node
)
if
(
!
gw_node
)
return
;
return
;
memset
(
gw_node
,
0
,
sizeof
(
struct
gw_node
));
INIT_HLIST_NODE
(
&
gw_node
->
list
);
INIT_HLIST_NODE
(
&
gw_node
->
list
);
gw_node
->
orig_node
=
orig_node
;
gw_node
->
orig_node
=
orig_node
;
atomic_set
(
&
gw_node
->
refcount
,
1
);
atomic_set
(
&
gw_node
->
refcount
,
1
);
...
...
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