Skip to content

Commit

Permalink
i2c: gxp: fix an error code in probe
Browse files Browse the repository at this point in the history
This is passing IS_ERR() instead of PTR_ERR() so instead of an error
code it prints and returns the number 1.

Fixes: 4a55ed6 ("i2c: Add GXP SoC I2C Controller")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Nick Hawkins <nick.hawkins@hpe.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
error27 authored and wsakernel committed Mar 3, 2023
1 parent 4b3dfb0 commit 65609d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-gxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev)
i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
"hpe,sysreg");
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");
}

Expand Down

0 comments on commit 65609d3

Please sign in to comment.