Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102912
b: refs/heads/master
c: cc0d9ff
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and John W. Linville committed Jun 14, 2008
1 parent fd685b9 commit 462c603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 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: a9f853ddd352954815a023c4811629ed117df2f8
refs/heads/master: cc0d9ff2c998410c7d4a99061a3ebdaa5c55ae9d
15 changes: 3 additions & 12 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -4561,22 +4561,13 @@ static ssize_t proc_read( struct file *file,
size_t len,
loff_t *offset )
{
loff_t pos = *offset;
struct proc_data *priv = (struct proc_data*)file->private_data;
struct proc_data *priv = file->private_data;

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

if (pos < 0)
return -EINVAL;
if (pos >= priv->readlen)
return 0;
if (len > priv->readlen - pos)
len = priv->readlen - pos;
if (copy_to_user(buffer, priv->rbuffer + pos, len))
return -EFAULT;
*offset = pos + len;
return len;
return simple_read_from_buffer(buffer, len, offset, priv->rbuffer,
priv->readlen);
}

/*
Expand Down

0 comments on commit 462c603

Please sign in to comment.