linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] fix oops with no /proc
@ 2009-11-22 14:21 Dan Carpenter
  2009-11-25 17:46 ` Florian Tobias Schandinat
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2009-11-22 14:21 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: JosephChan, ScottFang

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

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/video/via/viafbdev.c	2009-11-21 14:44:33.000000000 +0200
+++ devel/drivers/video/via/viafbdev.c	2009-11-21 14:44:43.000000000 +0200
@@ -1797,7 +1797,7 @@ static const struct file_operations viaf
 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);

------------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] fix oops with no /proc
  2009-11-22 14:21 [patch] fix oops with no /proc Dan Carpenter
@ 2009-11-25 17:46 ` Florian Tobias Schandinat
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2009-11-25 17:46 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: JosephChan, Andrew Morton, ScottFang,
	linux-fbdev-devel@lists.sourceforge.net

Hi,

nice catch. Your patch is obviously correct.
Please send it to Andrew Morton <akpm@linux-foundation.org> to get it 
into mainline.

Dan Carpenter schrieb:
> 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
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> 
> --- orig/drivers/video/via/viafbdev.c	2009-11-21 14:44:33.000000000 +0200
> +++ devel/drivers/video/via/viafbdev.c	2009-11-21 14:44:43.000000000 +0200
> @@ -1797,7 +1797,7 @@ static const struct file_operations viaf
>  static 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-25 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 14:21 [patch] fix oops with no /proc Dan Carpenter
2009-11-25 17:46 ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).