Re: [PATCH net v4] ice: Add check for kzalloc

From: Jiri Pirko
Date: Thu Dec 08 2022 - 11:02:20 EST


Thu, Dec 08, 2022 at 02:35:52PM CET, jiasheng@xxxxxxxxxxx wrote:
>Add the check for the return value of kzalloc in order to avoid
>NULL pointer dereference.
>Moreover, use the goto-label to share the clean code.
>
>Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY")
>Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>

Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>