aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/af_llc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r--net/llc/af_llc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index ef125345a2db..7e9cf3214b88 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -116,12 +116,12 @@ static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock)
116 struct llc_sock* llc = llc_sk(sk); 116 struct llc_sock* llc = llc_sk(sk);
117 int rc = 0; 117 int rc = 0;
118 118
119 if (llc_data_accept_state(llc->state) || llc->p_flag) { 119 if (unlikely(llc_data_accept_state(llc->state) || llc->p_flag)) {
120 long timeout = sock_sndtimeo(sk, noblock); 120 long timeout = sock_sndtimeo(sk, noblock);
121 121
122 rc = llc_ui_wait_for_busy_core(sk, timeout); 122 rc = llc_ui_wait_for_busy_core(sk, timeout);
123 } 123 }
124 if (!rc) 124 if (unlikely(!rc))
125 rc = llc_build_and_send_pkt(sk, skb); 125 rc = llc_build_and_send_pkt(sk, skb);
126 return rc; 126 return rc;
127} 127}
@@ -762,15 +762,13 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock,
762 if (!(sk->sk_type == SOCK_STREAM && !addr->sllc_ua)) 762 if (!(sk->sk_type == SOCK_STREAM && !addr->sllc_ua))
763 goto out; 763 goto out;
764 rc = llc_ui_send_data(sk, skb, noblock); 764 rc = llc_ui_send_data(sk, skb, noblock);
765 if (rc)
766 dprintk("%s: llc_ui_send_data failed: %d\n", __FUNCTION__, rc);
767out: 765out:
768 if (rc) 766 if (rc) {
769 kfree_skb(skb); 767 kfree_skb(skb);
770release: 768release:
771 if (rc)
772 dprintk("%s: failed sending from %02X to %02X: %d\n", 769 dprintk("%s: failed sending from %02X to %02X: %d\n",
773 __FUNCTION__, llc->laddr.lsap, llc->daddr.lsap, rc); 770 __FUNCTION__, llc->laddr.lsap, llc->daddr.lsap, rc);
771 }
774 release_sock(sk); 772 release_sock(sk);
775 return rc ? : copied; 773 return rc ? : copied;
776} 774}