Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225527
b: refs/heads/master
c: ad9082a
h: refs/heads/master
i:
  225525: 35a1446
  225523: e1dc471
  225519: e92c907
v: v3
  • Loading branch information
Akinobu Mita authored and John W. Linville committed Jan 4, 2011
1 parent e6572e7 commit 9f65d88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52671e43dbfb0e0dfa5fab604cb3984bd1d777a6
refs/heads/master: ad9082adfc0a6bdcef1bad2f22485575479d7a9d
20 changes: 7 additions & 13 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -4652,24 +4652,18 @@ static ssize_t proc_write( struct file *file,
size_t len,
loff_t *offset )
{
loff_t pos = *offset;
ssize_t ret;
struct proc_data *priv = file->private_data;

if (!priv->wbuffer)
return -EINVAL;

if (pos < 0)
return -EINVAL;
if (pos >= priv->maxwritelen)
return 0;
if (len > priv->maxwritelen - pos)
len = priv->maxwritelen - pos;
if (copy_from_user(priv->wbuffer + pos, buffer, len))
return -EFAULT;
if ( pos + len > priv->writelen )
priv->writelen = len + file->f_pos;
*offset = pos + len;
return len;
ret = simple_write_to_buffer(priv->wbuffer, priv->maxwritelen, offset,
buffer, len);
if (ret > 0)
priv->writelen = max_t(int, priv->writelen, *offset);

return ret;
}

static int proc_status_open(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 9f65d88

Please sign in to comment.