commit | 941825e11424f00f9a76c944c16f677aadfe3515 | [log] [tgz] |
---|---|---|
author | Colin Ian King <colin.king@canonical.com> | Wed Mar 29 18:05:40 2017 +0100 |
committer | Marcel Holtmann <marcel@holtmann.org> | Wed Apr 12 22:02:39 2017 +0200 |
tree | 7dfa01cd87065c4ee79b04c8176e8b3f008cfaa7 | |
parent | f1554b7b2c27cedee6c772dab954629987690110 [diff] |
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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>