Skip to content

Commit 65609d3

Browse files
error27wsakernel
authored andcommitted
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: 4a55ed6 ("i2c: Add GXP SoC I2C Controller") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Nick Hawkins <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 4b3dfb0 commit 65609d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-gxp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static int gxp_i2c_probe(struct platform_device *pdev)
516516
i2cg_map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
517517
"hpe,sysreg");
518518
if (IS_ERR(i2cg_map)) {
519-
return dev_err_probe(&pdev->dev, IS_ERR(i2cg_map),
519+
return dev_err_probe(&pdev->dev, PTR_ERR(i2cg_map),
520520
"failed to map i2cg_handle\n");
521521
}
522522

0 commit comments

Comments
 (0)