* [PATCH] i2c: npcm7xx: Fix a couple error codes in probe
@ 2020-06-08 14:17 Dan Carpenter
2020-06-08 20:30 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-06-08 14:17 UTC (permalink / raw)
To: Andy Shevchenko, Tali Perry; +Cc: Wolfram Sang, linux-i2c, kernel-janitors
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>
---
drivers/i2c/busses/i2c-npcm7xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index a8e75c3484f12..d679a04be0fd0 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))
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: npcm7xx: Fix a couple error codes in probe
2020-06-08 14:17 [PATCH] i2c: npcm7xx: Fix a couple error codes in probe Dan Carpenter
@ 2020-06-08 20:30 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-06-08 20:30 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Andy Shevchenko, Tali Perry, linux-i2c, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
On Mon, Jun 08, 2020 at 05:17:27PM +0300, Dan Carpenter wrote:
> 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>
Applied to for-5.8, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-08 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 14:17 [PATCH] i2c: npcm7xx: Fix a couple error codes in probe Dan Carpenter
2020-06-08 20:30 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).