]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:30 +0000 (17:25 +0200)
commit7584d19f784dde1222468b5e8b5528fb50a9b61a
tree1a546faf8ef8b52059286e93a802e0bf52ae6796
parentbe783a304d6f04f2665dafb134fd9f819fbb1ca1
Bluetooth: Fix passing NULL to PTR_ERR

commit fb9b1cfeb4d439f24729b7eb8bdd2a2197ea0ac9 upstream.

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>
Cc: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/bluetooth/bluetooth.h
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c