Commit 3d61e3df authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] fix return codes after i2c_add_driver() in tea6415c and tea6420

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: default avatarArthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: default avatarMichael Hunold <hunold@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 48275bb9
......@@ -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);
}
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment