aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 1e1446bf4b48..e30f8b79ea89 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4561,22 +4561,13 @@ static ssize_t proc_read( struct file *file,
4561 size_t len, 4561 size_t len,
4562 loff_t *offset ) 4562 loff_t *offset )
4563{ 4563{
4564 loff_t pos = *offset; 4564 struct proc_data *priv = file->private_data;
4565 struct proc_data *priv = (struct proc_data*)file->private_data;
4566 4565
4567 if (!priv->rbuffer) 4566 if (!priv->rbuffer)
4568 return -EINVAL; 4567 return -EINVAL;
4569 4568
4570 if (pos < 0) 4569 return simple_read_from_buffer(buffer, len, offset, priv->rbuffer,
4571 return -EINVAL; 4570 priv->readlen);
4572 if (pos >= priv->readlen)
4573 return 0;
4574 if (len > priv->readlen - pos)
4575 len = priv->readlen - pos;
4576 if (copy_to_user(buffer, priv->rbuffer + pos, len))
4577 return -EFAULT;
4578 *offset = pos + len;
4579 return len;
4580} 4571}
4581 4572
4582/* 4573/*