Skip to content
Commit f0f9f4bb authored by 蒋家盛's avatar 蒋家盛 Committed by Liwei Song
Browse files

ice: Add check for kzalloc



commit 40543b3d upstream.

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: d6b98c8d ("ice: add write functionality for GNSS TTY")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarLiwei Song <liwei.song@windriver.com>
parent b8b17c63
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment