Skip to contentSkip to conversation

olpc_dcon: actually return the value of i2c_add_driver

PATCH In review Andres Salomon 1 participant 1 message Feb 6, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 olpc_dcon: actually return the value of i2c_add_driver

It's nice to actually check for errors. :)

---
 drivers/staging/olpc_dcon/olpc_dcon.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/staging/olpc_dcon/olpc_dcon.c +2 -3
index 5d85d77..eec10e7 100644
@@ -872,7 +872,7 @@ static irqreturn_t dcon_interrupt(int irq, void *id)
 	return IRQ_HANDLED;
 }
 
-static struct i2c_device_id dcon_idtable[] = {
+static const struct i2c_device_id dcon_idtable[] = {
 	{ "olpc_dcon",  0 },
 	{ }
 };
@@ -901,8 +901,7 @@ static int __init olpc_dcon_init(void)
 {
 	pdata = &dcon_pdata_xo_1;
 
-	i2c_add_driver(&dcon_driver);
-	return 0;
+	return i2c_add_driver(&dcon_driver);
 }
 
 static void __exit olpc_dcon_exit(void)
Signature · 1 line
1.7.2.3