]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:34 +0000 (10:53 +0200)
commit827639b54f78c9dced42960ddec4cc3aafff6b3a
tree65d592206e53a43388e68ef5f9dbb35b3ba35e11
parent589bafa03d06c7a92c3a19cfc809682fdadbab7a
Bluetooth: Fix passing NULL to PTR_ERR

BugLink: https://bugs.launchpad.net/bugs/1988479
commit 266191aa8d14b84958aaeb5e96ee4e97839e3d87 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/net/bluetooth/bluetooth.h
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c