]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix return codes after i2c_add_driver() in tea6415c and tea6420
authorMichael Hunold <hunold@convergence.de>
Wed, 14 Jul 2004 02:27:38 +0000 (19:27 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 14 Jul 2004 02:27:38 +0000 (19:27 -0700)
In two of my i2c helper drivers the return value of i2c_add_driver() is
ignored.  Thanks to Arthur Othieno for finding these bugs.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c

index 326f12b3c87f6a6538b7f2df808620aa730b15c2..fe64e64e3e59fee60e6689431eadba84cdbafae1 100644 (file)
@@ -217,13 +217,12 @@ static struct i2c_driver driver = {
         .command       = tea6415c_command,
 };
 
-static int tea6415c_init_module(void)
+static int __init tea6415c_init_module(void)
 {
-       i2c_add_driver(&driver);
-       return 0;
+       return i2c_add_driver(&driver);
 }
 
-static void tea6415c_cleanup_module(void)
+static void __exit tea6415c_cleanup_module(void)
 {
         i2c_del_driver(&driver);
 }
index eca45035470ba51d56a9d894f159707a16557218..93acdc635f67f1a60619e2e75bd0d5c5bf2af0cf 100644 (file)
@@ -197,13 +197,12 @@ static struct i2c_driver driver = {
         .command       = tea6420_command,
 };
 
-static int tea6420_init_module(void)
+static int __init tea6420_init_module(void)
 {
-       i2c_add_driver(&driver);
-       return 0;
+       return i2c_add_driver(&driver);
 }
 
-static void tea6420_cleanup_module(void)
+static void __exit tea6420_cleanup_module(void)
 {
         i2c_del_driver(&driver);
 }