forked from Minki/linux
i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus
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>
This commit is contained in:
parent
2ec4d8831b
commit
78e6c5abeb
@ -232,9 +232,9 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user