Commit 78e6c5ab authored by Chris Packham's avatar Chris Packham Committed by Wolfram Sang

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 2ec4d883
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment