]> 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:14:19 +0000 (17:14 +0200)
commita1ddd0e646b4b25e8c928c7be2410fe5c4bafb97
tree20e63d520bd83287a5352e39b074c53c05377728
parent5a7f913c6a162384a6e9f12a8c510cb509217ce6
Bluetooth: Fix passing NULL to PTR_ERR

commit ad1e3ffe1416d616649d05cf9d4ec5d221bc002f 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