i2c: gxp: fix an error code in probe
PATCH 1/1 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 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/i2c/busses/i2c-gxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-gxp.c +1 -1
@@ -525,7 +525,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" ); }
Signature · 1 line
2.39.1
Quoted 6 lines
This is passing
IS_ERR()instead ofPTR_ERR()so instead of an error code it prints and returns the number 1.Fixes 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller")Signed-off-by Dan Carpenter <[email protected] <mailto:[email protected]>>
Looks good to me.
Reviewed-by Nick Hawkins <[email protected]>
Wolfram Sang
AppliedQuoted 5 lines · Dan Carpenter
This is passing
IS_ERR()instead ofPTR_ERR()so instead of an error code it prints and returns the number 1.Fixes 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller")Signed-off-by Dan Carpenter <[email protected]>
Applied to for-current, thanks!