Skip to content

Commit

Permalink
staging: olpc_dcon: actually return the value of i2c_add_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andres Salomon authored and Greg Kroah-Hartman committed Feb 9, 2011
1 parent bada46e commit 56463de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/olpc_dcon/olpc_dcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
{ }
};
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 56463de

Please sign in to comment.