]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btrtl: fix incorrect skb allocation failure check
authorColin Ian King <colin.king@canonical.com>
Tue, 10 Nov 2020 12:39:15 +0000 (12:39 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 11 Nov 2020 10:53:56 +0000 (11:53 +0100)
commitef146f59d9d2cb3f2409e6fafd110bfb509a8660
tree914afb6b374b8c6cbc8560c31ffb84fae7046b2b
parent4789347e815452f0f745dc86e6e8b6c9b5418917
Bluetooth: btrtl: fix incorrect skb allocation failure check

Currently the check for a failed bt_skb_alloc allocation is incorrectly
checking using IS_ERR and this can lead to a null pointer dereference. Fix
this by checking for a null pointer return using the !skb idiom.

Addresses-Coverity: ("Dereference null return")
Fixes: 394182bb009b ("Bluetooth: btrtl: Ask 8821C to drop old firmware")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btrtl.c