Commit 65609d32 authored by Dan Carpenter's avatar Dan Carpenter Committed by Wolfram Sang

i2c: gxp: fix an error code in probe

This is passing IS_ERR() instead of PTR_ERR() so instead of an error
code it prints and returns the number 1.

Fixes: 4a55ed6f ("i2c: Add GXP SoC I2C Controller")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarNick Hawkins <nick.hawkins@hpe.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 4b3dfb0e
...@@ -516,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev) ...@@ -516,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev)
i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
"hpe,sysreg"); "hpe,sysreg");
if (IS_ERR(i2cg_map)) { if (IS_ERR(i2cg_map)) {
return dev_err_probe(&pdev->dev, IS_ERR(i2cg_map), return dev_err_probe(&pdev->dev, PTR_ERR(i2cg_map),
"failed to map i2cg_handle\n"); "failed to map i2cg_handle\n");
} }
......
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