diff options
Diffstat (limited to 'arch/mips/lasat/picvue_proc.c')
-rw-r--r-- | arch/mips/lasat/picvue_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c index b42095880667..27533c109f92 100644 --- a/arch/mips/lasat/picvue_proc.c +++ b/arch/mips/lasat/picvue_proc.c | |||
@@ -43,7 +43,7 @@ static int pvc_line_proc_show(struct seq_file *m, void *v) | |||
43 | { | 43 | { |
44 | int lineno = *(int *)m->private; | 44 | int lineno = *(int *)m->private; |
45 | 45 | ||
46 | if (lineno < 0 || lineno > PVC_NLINES) { | 46 | if (lineno < 0 || lineno >= PVC_NLINES) { |
47 | printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno); | 47 | printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno); |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
@@ -67,7 +67,7 @@ static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf, | |||
67 | char kbuf[PVC_LINELEN]; | 67 | char kbuf[PVC_LINELEN]; |
68 | size_t len; | 68 | size_t len; |
69 | 69 | ||
70 | BUG_ON(lineno < 0 || lineno > PVC_NLINES); | 70 | BUG_ON(lineno < 0 || lineno >= PVC_NLINES); |
71 | 71 | ||
72 | len = min(count, sizeof(kbuf) - 1); | 72 | len = min(count, sizeof(kbuf) - 1); |
73 | if (copy_from_user(kbuf, buf, len)) | 73 | if (copy_from_user(kbuf, buf, len)) |