Skip to content

Commit

Permalink
parisc/led: Fix sparse warnings
Browse files Browse the repository at this point in the history
Annotate user buffer and use NULL to avoid sparse warnings.

Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed Mar 27, 2018
1 parent c92826e commit 2d76978
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/parisc/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int led_proc_open(struct inode *inode, struct file *file)
}


static ssize_t led_proc_write(struct file *file, const char *buf,
static ssize_t led_proc_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{
void *data = PDE_DATA(file_inode(file));
Expand Down Expand Up @@ -250,7 +250,7 @@ static int __init led_create_procfs(void)

if (led_type == -1) return -1;

proc_pdc_root = proc_mkdir("pdc", 0);
proc_pdc_root = proc_mkdir("pdc", NULL);
if (!proc_pdc_root) return -1;

if (!lcd_no_led_support)
Expand Down

0 comments on commit 2d76978

Please sign in to comment.