]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix passing NULL to PTR_ERR
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 16 Sep 2021 20:10:48 +0000 (13:10 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 21 Sep 2021 08:44:52 +0000 (10:44 +0200)
commitfb9b1cfeb4d439f24729b7eb8bdd2a2197ea0ac9
tree3cfbce208e8c3283c8d986839f1c5c2d6409acb6
parentc68716fa39235d3c188b90ea8408d5541a54f6d9
Bluetooth: Fix passing NULL to PTR_ERR

Passing NULL to PTR_ERR will result in 0 (success), also since the likes of
bt_skb_sendmsg does never return NULL it is safe to replace the instances of
IS_ERR_OR_NULL with IS_ERR when checking its return.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/bluetooth.h
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c