提交 a5d62a14 编写于 作者: D David S. Miller

isdn: Fix printed out copy_from_user() return value after previous change.

Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f073c7ca
......@@ -189,7 +189,7 @@ ISARVersion(struct IsdnCardState *cs, char *s)
static int
isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
{
int ret, size, cnt, debug;
int cfu_ret, ret, size, cnt, debug;
u_char len, nom, noc;
u_short sadr, left, *sp;
u_char __user *p = buf;
......@@ -212,8 +212,9 @@ isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO);
#endif
if (copy_from_user(&size, p, sizeof(int))) {
printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", ret);
cfu_ret = copy_from_user(&size, p, sizeof(int));
if (cfu_ret) {
printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", cfu_ret);
return -EFAULT;
}
p += sizeof(int);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册