qcacmn: Add NULL pointer check for ce_hdl

When the memory allocation is fail for shadow_base_unaligned in
ce_init(), the ce_hdl will also be NULL. So we need to check if
ce_hdl is null or not before use it.

Change-Id: I88bb7323b3f171a17e07cbc6168b6f26412803f6
CRs-Fixed: 3531693
This commit is contained in:
Guisen Yang
2023-06-15 16:23:10 +08:00
committed by Rahul Choudhary
父節點 676e3bd122
當前提交 134088aadd

查看文件

@@ -3506,6 +3506,11 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
}
ce_hdl = pipe_info->ce_hdl;
if (!ce_hdl) {
hif_err("ce_hdl is NULL");
return QDF_STATUS_E_INVAL;
}
ce_id = ((struct CE_state *)ce_hdl)->id;
qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock);