diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2011-01-21 19:24:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-21 19:24:23 -0500 |
commit | 2221eca0a2c0f7f9918efdcaa52fb8e1adff991f (patch) | |
tree | 84b5b7953ca47901c321def346ce56f6ebc5e5e6 /drivers/atm | |
parent | 9190b3b3208d052d98cb601fcc192f3f71a5658b (diff) |
atm: idt77105: fix fetch_stats() result
copy_to_user() used PRIV(dev)->stats instead of local stats variable.
Zero stats were returned to user in case of (zero != 0), also memcpy()
was pointless.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/idt77105.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index bca9cb89a118..487a54739854 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c | |||
@@ -151,7 +151,7 @@ static int fetch_stats(struct atm_dev *dev,struct idt77105_stats __user *arg,int | |||
151 | spin_unlock_irqrestore(&idt77105_priv_lock, flags); | 151 | spin_unlock_irqrestore(&idt77105_priv_lock, flags); |
152 | if (arg == NULL) | 152 | if (arg == NULL) |
153 | return 0; | 153 | return 0; |
154 | return copy_to_user(arg, &PRIV(dev)->stats, | 154 | return copy_to_user(arg, &stats, |
155 | sizeof(struct idt77105_stats)) ? -EFAULT : 0; | 155 | sizeof(struct idt77105_stats)) ? -EFAULT : 0; |
156 | } | 156 | } |
157 | 157 | ||