From: Dan Carpenter Date: Wed, 16 Dec 2009 00:46:36 +0000 (-0800) Subject: drivers/video/via/viafbdev.c: fix oops with no /proc X-Git-Tag: v3.0~6495^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8130b3b9e6773367b44a19b504bb7c0c23e81a0e;p=platform%2Fkernel%2Flinux-amlogic.git drivers/video/via/viafbdev.c: fix oops with no /proc 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 Acked-by: Florian Tobias Schandinat Cc: Joseph Chan Cc: Scott Fang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 56ec696..10d8c4b 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -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);