Skip to content
Commit 941825e1 authored by Colin Ian King's avatar Colin Ian King Committed by Marcel Holtmann
Browse files

ieee802154: ca8210: Add checks for kmalloc allocation failures



Ensure we don't end up with a null pointer dereferences by checking
for for allocation failures.  Allocate by sizeof(*ptr) rather than
the type to fix checkpack warnings.  Also merge multiple lines into
one line for the kmalloc call.

Detected by CoverityScan, CID#1422435 ("Dereference null return value")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent f1554b7b
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