Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300754
b: refs/heads/master
c: 8831a3f
h: refs/heads/master
v: v3
  • Loading branch information
Peter Hüwe authored and David S. Miller committed Apr 15, 2012
1 parent 094538c commit a88fa65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf22f9a2b83e72082c43ef5c942d5daf9301da8e
refs/heads/master: 8831a3f2c9ee7d952e6d7a018d11c0c9c5b56749
10 changes: 1 addition & 9 deletions trunk/drivers/isdn/hysdn/hysdn_proclog.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,9 @@ static ssize_t
hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t *off)
{
int rc;
unsigned char valbuf[128];
hysdn_card *card = file->private_data;

if (count > (sizeof(valbuf) - 1))
count = sizeof(valbuf) - 1; /* limit length */
if (copy_from_user(valbuf, buf, count))
return (-EFAULT); /* copy failed */

valbuf[count] = 0; /* terminating 0 */

rc = kstrtoul(valbuf, 0, &card->debug_flags);
rc = kstrtoul_from_user(buf, count, 0, &card->debug_flags);
if (rc < 0)
return rc;
hysdn_addlog(card, "debug set to 0x%lx", card->debug_flags);
Expand Down

0 comments on commit a88fa65

Please sign in to comment.