Skip to contentSkip to conversation

matroxfb: simply return what i2c_add_driver() does

PATCH New Arthur Othieno 1 participant 1 message Dec 20, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 matroxfb: simply return what i2c_add_driver() does

`insmod' will tell us when the module failed to load. We do no further processing on the return from i2c_add_driver(), so just return that instead of storing it.

Add __init/__exit annotations while we're at it.

---

 drivers/video/matrox/matroxfb_maven.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

5599955f4f42ebfd5b244563f2be24f9e60fe186

drivers/video/matrox/matroxfb_maven.c +5 -12
index ad60bbb..d5275c7 100644
@@ -1302,20 +1302,13 @@ static struct i2c_driver maven_driver={
 	.command	= maven_command,
 };
 
-/* ************************** */
-
-static int matroxfb_maven_init(void) {
-	int err;
-
-	err = i2c_add_driver(&maven_driver);
-	if (err) {
-		printk(KERN_ERR "maven: Maven driver failed to register (%d).\n", err);
-		return err;
-	}
-	return 0;
+static int __init matroxfb_maven_init(void)
+{
+	return i2c_add_driver(&maven_driver);
 }
 
-static void matroxfb_maven_exit(void) {
+static void __exit matroxfb_maven_exit(void)
+{
 	i2c_del_driver(&maven_driver);
 }
 
Signature · 1 line
0.99.9n