@@ -505,7 +505,7 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk,
struct sk_buff *tmp;
tmp = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom);
- if (IS_ERR(tmp)) {
+ if (IS_ERR_OR_NULL(tmp)) {
kfree_skb(skb);
return tmp;
}
@@ -583,7 +583,7 @@ static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg,
skb = bt_skb_sendmmsg(sk, msg, len, d->mtu, RFCOMM_SKB_HEAD_RESERVE,
RFCOMM_SKB_TAIL_RESERVE);
- if (IS_ERR(skb))
+ if (IS_ERR_OR_NULL(skb))
return PTR_ERR(skb);
sent = rfcomm_dlc_send(d, skb);
@@ -734,7 +734,7 @@ static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
return -EOPNOTSUPP;
skb = bt_skb_sendmsg(sk, msg, len, len, 0, 0);
- if (IS_ERR(skb))
+ if (IS_ERR_OR_NULL(skb))
return PTR_ERR(skb);
lock_sock(sk);
This reverts commit 266191aa8d14b84958aaeb5e96ee4e97839e3d87, so that commit 81be03e026dc ("Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg"), introducing a regression, can be reverted. Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> --- include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/rfcomm/sock.c | 2 +- net/bluetooth/sco.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)