drivers/video/via/viafbdev.c: fix oops with no /proc
authorDan Carpenter <error27@gmail.com>
Wed, 16 Dec 2009 00:46:36 +0000 (16:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:04 +0000 (07:20 -0800)
Fixed a typo: missing *.  This would lead to a kernel oops if the kernel
was compiled without support for the /proc file system.

Found with a static checker.  Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/via/viafbdev.c

index 56ec696e8afa504af10d58b2413e79b5c2240e83..10d8c4b4baeb855f2ec54853e8988947e0231a12 100644 (file)
@@ -1797,7 +1797,7 @@ static const struct file_operations viafb_vt1636_proc_fops = {
 static void viafb_init_proc(struct proc_dir_entry **viafb_entry)
 {
        *viafb_entry = proc_mkdir("viafb", NULL);
-       if (viafb_entry) {
+       if (*viafb_entry) {
                proc_create("dvp0", 0, *viafb_entry, &viafb_dvp0_proc_fops);
                proc_create("dvp1", 0, *viafb_entry, &viafb_dvp1_proc_fops);
                proc_create("dfph", 0, *viafb_entry, &viafb_dfph_proc_fops);