Commit 4a37dd4c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] drivers/media/video/tda9840.c: honour return code of i2c_add_driver()

From: Michael Hunold <m.hunold@gmx.de>

i2c_add_driver() may actually fail, but my driver returns 0 regardless. 
Thanks to Arthur Othieno <a.othieno@bluewin.ch> for this obviously correct
patch.
Signed-off-by: default avatarMichael Hunold <hunold@linuxtv.org>
Signed-off-by: default avatarArthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 01ae403b
......@@ -268,13 +268,12 @@ static struct i2c_driver driver = {
.command = tda9840_command,
};
static int tda9840_init_module(void)
static int __init tda9840_init_module(void)
{
i2c_add_driver(&driver);
return 0;
return i2c_add_driver(&driver);
}
static void tda9840_cleanup_module(void)
static void __exit tda9840_cleanup_module(void)
{
i2c_del_driver(&driver);
}
......@@ -285,4 +284,3 @@ module_exit(tda9840_cleanup_module);
MODULE_AUTHOR("Michael Hunold <michael@mihu.de>");
MODULE_DESCRIPTION("tda9840 driver");
MODULE_LICENSE("GPL");
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