Re: [PATCH] staging: rtl8723bs: os_dep: avoid NULL pointer derefernece in rtw_cbuf_alloc

From: Ethan Tidmore

Date: Mon Apr 13 2026 - 16:57:22 EST


On Mon Apr 13, 2026 at 1:08 PM CDT, Shyam Sunder Reddy Padira wrote:
> The return value of kzalloc_flex() is used without
> ensuring that the allocation succeeded, and the
> pointer is dereferenced unconditionally.
>
> Guard the access to the allocated structure to
> avoid a potiental NULL pointer dereference if the

potential.

> allocation fails.
>
> Signed-off-by: Shyam Sunder Reddy Padira <shyamsunderreddypadira@xxxxxxxxx>
> ---

You spelt dereference in your subject wrong too. This patch needs a
Fixes: tag.

Thanks,

ET