mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'master' into for-next
This commit is contained in:
commit
d790d4d583
1744 changed files with 34722 additions and 212841 deletions
|
|
@ -176,16 +176,18 @@ static ssize_t led_proc_write(struct file *file, const char *buf,
|
|||
size_t count, loff_t *pos)
|
||||
{
|
||||
void *data = PDE(file->f_path.dentry->d_inode)->data;
|
||||
char *cur, lbuf[count + 1];
|
||||
char *cur, lbuf[32];
|
||||
int d;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
|
||||
memset(lbuf, 0, count + 1);
|
||||
if (count >= sizeof(lbuf))
|
||||
count = sizeof(lbuf)-1;
|
||||
|
||||
if (copy_from_user(lbuf, buf, count))
|
||||
return -EFAULT;
|
||||
lbuf[count] = 0;
|
||||
|
||||
cur = lbuf;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue