summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-npcm7xx.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-08 17:17:27 +0300
committerWolfram Sang <wsa@kernel.org>2020-06-08 22:29:36 +0200
commitde9be772c6794f27d1aa02d90d370b724cb67fd7 (patch)
tree35aebabf66a40c490a5a0ad4ee5a92a9fd199cdb /drivers/i2c/busses/i2c-npcm7xx.c
parentcdb555397f438592bab00599037c347b700cf397 (diff)
i2c: npcm7xx: Fix a couple of error codes in probe
The code here is accidentally returning IS_ERR() which is 1 but it should be returning negative error codes with PTR_ERR(). Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-npcm7xx.c')
-rw-r--r--drivers/i2c/busses/i2c-npcm7xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 68951a293aae..3528d30ea650 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -2239,12 +2239,12 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev)
gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr");
if (IS_ERR(gcr_regmap))
- return IS_ERR(gcr_regmap);
+ return PTR_ERR(gcr_regmap);
regmap_write(gcr_regmap, NPCM_I2CSEGCTL, NPCM_I2CSEGCTL_INIT_VAL);
clk_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-clk");
if (IS_ERR(clk_regmap))
- return IS_ERR(clk_regmap);
+ return PTR_ERR(clk_regmap);
bus->reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(bus->reg))