error = -ENOMEM;
if (!new_acts)
goto error;
+ error = -EFAULT;
if (copy_from_user(new_acts->actions, uf.actions,
uf.n_actions * sizeof *uf.actions))
goto error_free_actions;
}
stats.max_miss_queue = DP_MAX_QUEUE_LEN;
stats.max_action_queue = DP_MAX_QUEUE_LEN;
- return copy_to_user(statsp, &stats, sizeof stats);
+ return copy_to_user(statsp, &stats, sizeof stats) ? -EFAULT : 0;
}
static int
memset(&op, 0, sizeof op);
strncpy(op.devname, p->dev->name, sizeof op.devname);
op.port = p->port_no;
- return copy_to_user(uop, &op, sizeof op);
+ return copy_to_user(uop, &op, sizeof op) ? -EFAULT : 0;
}
static int