Skip to content

Commit 78e6c5a

Browse files
cpackham-atlnzWolfram Sang
authored andcommitted
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 <[email protected]> Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 2ec4d88 commit 78e6c5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/i2c/busses/i2c-pca-platform.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
232232
return ret;
233233
}
234234

235-
if (i2c_pca_add_numbered_bus(&i2c->adap) < 0) {
236-
return -ENODEV;
237-
}
235+
ret = i2c_pca_add_numbered_bus(&i2c->adap);
236+
if (ret)
237+
return ret;
238238

239239
platform_set_drvdata(pdev, i2c);
240240

0 commit comments

Comments
 (0)