drivers/media/video/tea6415c.c: ACK return on
PATCH 1/1 drivers/media/video/tea6415c.c: ACK return on
Hi,
i2c_add_driver() may actually fail, but this driver returns 0 regardless. Against 2.6.7. Thanks.
Signed-off-by Arthur Othieno <[email protected]>
tea6415c.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/media/video/tea6415c.c +3 -4
@@ -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); }
PATCH 1/1 [2.6] fix return codes after i2c_add_driver() in tea6415c and tea6420
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.
- [V4L] - i2c_add_driver() may actually fail, but both tea6420 and tea6415c driver return 0 regardless
Signed-off-by Arthur Othieno <[email protected]>
Signed-off-by Michael Hunold <[email protected]>
drivers/media/video/tea6420.c +3 -4
@@ -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); }
drivers/media/video/tea6415c.c +3 -4
@@ -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); }