staging: olpc_dcon: actually return the value of i2c_add_driver
authorAndres Salomon <dilinger@queued.net>
Sun, 6 Feb 2011 23:28:53 +0000 (15:28 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Feb 2011 20:11:54 +0000 (12:11 -0800)
It's nice to actually check for errors. :)

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/olpc_dcon/olpc_dcon.c

index 5d85d779952d3636f7a40df94dfb5b45cdfbcf28..eec10e78fabacfe291769da04ae22f8bfc5e5693 100644 (file)
@@ -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)