fix oops with no /proc
PATCH 1/1 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.
regards,
dan carpenter
drivers/video/via/viafbdev.c +1 -1
@@ -1797,7 +1797,7 @@ static const struct file_operations viafstatic 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);
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
Hi,
nice catch. Your patch is obviously correct.
Please send it to Andrew Morton <[email protected]> to get it into mainline.
Quoted 9 lines · Dan Carpenter
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.
regards,
dan carpenterSigned-off-by Dan Carpenter <[email protected]>
drivers/video/via/viafbdev.c static const struct file_operations viaf · line 1800
Quoted 9 lines
drivers/video/via/viafbdev.c +1
-1@@ -1797,7 +1797,7 @@ static const struct file_operations viafstatic void viafb_init_proc (struct proc_dir_entry **viafb_entry) { *viafb_entry =proc_mkdir ("viafb" ,NULL ); -if (viafb_entry) { +if (*viafb_entry) {
Thanks,
Florian Tobias Schandinat
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july