Rather than returning -ENODEV if i2c_pca_add_numbered_bus() fails,
propagate the error to aid debugging.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
return ret;
}
- if (i2c_pca_add_numbered_bus(&i2c->adap) < 0) {
- return -ENODEV;
- }
+ ret = i2c_pca_add_numbered_bus(&i2c->adap);
+ if (ret)
+ return ret;
platform_set_drvdata(pdev, i2c);