aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r--drivers/isdn/i4l/isdn_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 22759c01746a..81accdf35168 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1177,9 +1177,8 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off
1177 goto out; 1177 goto out;
1178 } 1178 }
1179 chidx = isdn_minor2chan(minor); 1179 chidx = isdn_minor2chan(minor);
1180 while (isdn_writebuf_stub(drvidx, chidx, buf, count) != count) 1180 while ((retval = isdn_writebuf_stub(drvidx, chidx, buf, count)) == 0)
1181 interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); 1181 interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]);
1182 retval = count;
1183 goto out; 1182 goto out;
1184 } 1183 }
1185 if (minor <= ISDN_MINOR_CTRLMAX) { 1184 if (minor <= ISDN_MINOR_CTRLMAX) {
@@ -1951,9 +1950,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)
1951 struct sk_buff *skb = alloc_skb(hl + len, GFP_ATOMIC); 1950 struct sk_buff *skb = alloc_skb(hl + len, GFP_ATOMIC);
1952 1951
1953 if (!skb) 1952 if (!skb)
1954 return 0; 1953 return -ENOMEM;
1955 skb_reserve(skb, hl); 1954 skb_reserve(skb, hl);
1956 copy_from_user(skb_put(skb, len), buf, len); 1955 if (copy_from_user(skb_put(skb, len), buf, len))
1956 return -EFAULT;
1957 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); 1957 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
1958 if (ret <= 0) 1958 if (ret <= 0)
1959 dev_kfree_skb(skb); 1959 dev_kfree_skb(skb);