X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-parport.c;fp=drivers%2Fi2c%2Fbusses%2Fi2c-parport.c;h=7e2e8cd1c14a90d0806d382df0e9b726e34768b2;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=934bd55bae15da1164ca7b14b79a5c7bb2cfcf18;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 934bd55ba..7e2e8cd1c 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c @@ -241,14 +241,9 @@ static struct parport_driver i2c_parport_driver = { static int __init i2c_parport_init(void) { - if (type < 0) { - printk(KERN_WARNING "i2c-parport: adapter type unspecified\n"); - return -ENODEV; - } - - if (type >= ARRAY_SIZE(adapter_parm)) { + if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) { printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); - return -ENODEV; + type = 0; } return parport_register_driver(&i2c_parport_driver);