Skip to content

Commit 516cca5

Browse files
arter97onettboots
authored andcommitted
binder: Avoid redundant zeroing of twcb and fixup
These are initialized properly from the code just below kzalloc(). Replace it with kmalloc(). Change-Id: I0708699817fb6d0a1265bfbec6d3b27cfa00dd34 Signed-off-by: Juhyung Park <qkrwngud825@gmail.com> Signed-off-by: Helium-Studio <67852324+Helium-Studio@users.noreply.github.com> Signed-off-by: onettboots <blackcocopet@gmail.com>
1 parent 628e7d6 commit 516cca5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/android/binder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,7 @@ static void binder_deferred_fd_close(int fd)
23162316
{
23172317
struct binder_task_work_cb *twcb;
23182318

2319-
twcb = kzalloc(sizeof(*twcb), GFP_KERNEL);
2319+
twcb = kmalloc(sizeof(*twcb), GFP_KERNEL);
23202320
if (!twcb)
23212321
return;
23222322
init_task_work(&twcb->twork, binder_do_fd_close);
@@ -2667,7 +2667,7 @@ static int binder_translate_fd(int fd,
26672667
* of the fd in the target needs to be done from a
26682668
* target thread.
26692669
*/
2670-
fixup = kzalloc(sizeof(*fixup), GFP_KERNEL);
2670+
fixup = kmalloc(sizeof(*fixup), GFP_KERNEL);
26712671
if (!fixup) {
26722672
ret = -ENOMEM;
26732673
goto err_get_unused_fd;

0 commit comments

Comments
 (0)