ANDROID: fix use of plain integer as NULL pointer

This patch fixes the following sparse issues:

  drivers/android/binder.c:1373:70: sparse: sparse: Using plain integer as NULL pointer
  drivers/android/binder.c:2508:41: sparse: sparse: Using plain integer as NULL pointer

Fixes: e107ea9e4dd1 ("ANDROID: vendor_hooks: Add hooks for binder proc transaction")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304150607.IuUhkfxB-lkp@intel.com/
Cc: zhengding chen <chenzhengding@oppo.com>
Change-Id: I272b3239e2d81bfdd28d1fe412f2c3d0731ec50f
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
Carlos Llamas
2023-04-26 02:16:25 +00:00
parent 306223f885
commit 2e61d90c44

View File

@@ -1399,7 +1399,8 @@ err_no_ref:
*/
static void binder_free_ref(struct binder_ref *ref)
{
trace_android_vh_binder_del_ref(ref->proc ? ref->proc->tsk : 0, ref->data.desc);
trace_android_vh_binder_del_ref(ref->proc ? ref->proc->tsk : NULL,
ref->data.desc);
if (ref->node)
binder_free_node(ref->node);
kfree(ref->death);
@@ -2871,7 +2872,8 @@ static int binder_proc_transaction(struct binder_transaction *t,
thread = binder_select_thread_ilocked(proc);
trace_android_vh_binder_proc_transaction(current, proc->tsk,
thread ? thread->task : 0, node->debug_id, t->code, pending_async);
thread ? thread->task : NULL, node->debug_id, t->code,
pending_async);
if (thread) {
binder_transaction_priority(thread->task, t, node_prio,