public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] fix a drivers/char/isicom.c compile warning
@ 2004-01-13  0:00 Adrian Bunk
  2004-01-13  0:17 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2004-01-13  0:00 UTC (permalink / raw)
  To: linux-kernel

I got the following compile warning in 2.6.1-mm2 (but it doesn't seem to 
be specific to -mm):


<--  snip  -->

...
  CC [M]  drivers/char/isicom.o
...
drivers/char/isicom.c: In function `unregister_drivers':
drivers/char/isicom.c:1677: warning: `error' might be used uninitialized in this function
...

<--  snip  -->


The following patch fixes this issue:


--- linux-2.6.1-mm2-modular-no-smp/drivers/char/isicom.c.old	2004-01-13 00:40:02.000000000 +0100
+++ linux-2.6.1-mm2-modular-no-smp/drivers/char/isicom.c	2004-01-13 00:49:00.000000000 +0100
@@ -1675,7 +1675,7 @@
 static void unregister_drivers(void)
 {
 	int error;
-	if (tty_unregister_driver(isicom_normal))
+	if ((error=tty_unregister_driver(isicom_normal)))
 		printk(KERN_DEBUG "ISICOM: couldn't unregister normal driver error=%d.\n",error);
 	put_tty_driver(isicom_normal);
 }



cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2004-01-13 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-13  0:00 [2.6 patch] fix a drivers/char/isicom.c compile warning Adrian Bunk
2004-01-13  0:17 ` Arnaldo Carvalho de Melo
2004-01-13  0:23   ` Adrian Bunk
2004-01-13  0:38     ` Arnaldo Carvalho de Melo
2004-01-13 11:45       ` Angelo Dell'Aera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox