Thread (4 messages) flat view 4 messages, 3 authors, 2017-03-29

Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2017-03-29 18:55:46
Also in: kernel-janitors, lkml

Hi Colin,
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: Colin Ian King <redacted>
---
drivers/net/ieee802154/ca8210.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
patch has been applied to bluetooth-next tree.

Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help