On 11/17/16 19:20, Laurent Pinchart wrote:
>> > Oops, forgot to handle the return values. This is how I fixed it:
>> > static int __init tfp410_module_init(void)
>> > {
>> >    int ret;
>> > 
>> >    ret = i2c_add_driver(&tfp410_i2c_driver);
>> >    if (ret)
>> >            return ret;
>> > 
>> >    ret = platform_driver_register(&tfp410_platform_driver);
>> >    if (ret)
>> >            i2c_del_driver(&tfp410_i2c_driver);
>> > 
>> >    return ret;
>> > }
> If registration of one of the two drivers fail, wouldn't it make sense to 
> still continue (probably with an error message) to avoid breaking the other 
> one ?
> 

Oh, good point. I fix that too. Anything else about this series? I'd
like to send a pull request for 4.10 soon.

>>> > > +
>>> > > +       return 0;
>>> > > +}

Reply via email to