aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-12-10 19:49:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 19:52:38 -0500
commita5d62a149bb8f5359aff7ed7dce339752fbabfd9 (patch)
tree98e52ed6da45fdeca62a0e32895ec46783cd973c
parentf073c7ca29a4a7e14060d9d3ddf09bfbb7cd9cc0 (diff)
isdn: Fix printed out copy_from_user() return value after previous change.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/isdn/hisax/isar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index c9cd4d22b4a5..d4cce337add2 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -189,7 +189,7 @@ ISARVersion(struct IsdnCardState *cs, char *s)
189static int 189static int
190isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf) 190isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
191{ 191{
192 int ret, size, cnt, debug; 192 int cfu_ret, ret, size, cnt, debug;
193 u_char len, nom, noc; 193 u_char len, nom, noc;
194 u_short sadr, left, *sp; 194 u_short sadr, left, *sp;
195 u_char __user *p = buf; 195 u_char __user *p = buf;
@@ -212,8 +212,9 @@ isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO); 212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO);
213#endif 213#endif
214 214
215 if (copy_from_user(&size, p, sizeof(int))) { 215 cfu_ret = copy_from_user(&size, p, sizeof(int));
216 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", ret); 216 if (cfu_ret) {
217 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", cfu_ret);
217 return -EFAULT; 218 return -EFAULT;
218 } 219 }
219 p += sizeof(int); 220 p += sizeof(int);