All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Hunold <hunold@convergence.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Arthur Othieno <a.othieno@bluewin.ch>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	a.othieno@bluewin.ch
Subject: [PATCH][2.6] fix return codes after i2c_add_driver() in tea6415c and tea6420
Date: Mon, 12 Jul 2004 21:54:52 +0200	[thread overview]
Message-ID: <40F2EC8C.7080101@convergence.de> (raw)
In-Reply-To: <20040622154839.GI1473@mars>

[-- 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);
 }

      reply	other threads:[~2004-07-12 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40F2EC8C.7080101@convergence.de \
    --to=hunold@convergence.de \
    --cc=a.othieno@bluewin.ch \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.