All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6] fix return codes after i2c_add_driver() in tea6415c and tea6420
  2005-05-19  6:25 [PATCH 2.6] drivers/media/video/tea6415c.c: ACK return on Arthur Othieno
@ 2004-07-12 19:54 ` Michael Hunold
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Hunold @ 2004-07-12 19:54 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Arthur Othieno, Andrew Morton, Linux Kernel Mailing List,
	a.othieno

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Hello Linus, Andrew,

in two of my i2c helper drivers the return value of i2c_add_driver() is 
ignored. Thanks to Arthur Othieno for finding these bugs.

The patch is trivial. Please apply.

CU
Michael.

[-- Attachment #2: misc-i2c-module-fixes.diff --]
[-- Type: text/plain, Size: 1296 bytes --]

- [V4L] - i2c_add_driver() may actually fail, but both tea6420 and tea6415c driver return 0 regardless

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Michael Hunold <hunold@linuxtv.org>

--- a/drivers/media/video/tea6420.c	2003-12-18 03:58:49.000000000 +0100
+++ b/drivers/media/video/tea6420.c	2004-06-04 18:14:36.000000000 +0200
@@ -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);
 }
--- a/drivers/media/video/tea6415c.c	2003-12-18 03:59:16.000000000 +0100
+++ b/drivers/media/video/tea6415c.c	2004-03-31 20:24:35.000000000 +0200
@@ -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);
 }

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

* [PATCH 2.6] drivers/media/video/tea6415c.c: ACK return on
@ 2005-05-19  6:25 Arthur Othieno
  2004-07-12 19:54 ` [PATCH][2.6] fix return codes after i2c_add_driver() in tea6415c and tea6420 Michael Hunold
  0 siblings, 1 reply; 2+ messages in thread
From: Arthur Othieno @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi,

i2c_add_driver() may actually fail, but this driver returns 0
regardless. Against 2.6.7. Thanks.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>


 tea6415c.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/media/video/tea6415c.c	2003-12-18 03:59:16.000000000 +0100
+++ b/drivers/media/video/tea6415c.c	2004-03-31 20:24:35.000000000 +0200
@@ -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);
 }

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

end of thread, other threads:[~2005-05-19  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:25 [PATCH 2.6] drivers/media/video/tea6415c.c: ACK return on Arthur Othieno
2004-07-12 19:54 ` [PATCH][2.6] fix return codes after i2c_add_driver() in tea6415c and tea6420 Michael Hunold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.