Skip to contentSkip to conversation

i2c: xgene-slimpro: Fix inconsistent IS_ERR and PTR_ERR

PATCH In review Wan Jiabing 2 participants 2 messages Nov 2, 2021 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: xgene-slimpro: Fix inconsistent IS_ERR and PTR_ERR

Fix following coccicheck warning:
./drivers/i2c/busses/i2c-xgene-slimpro.c:488:6-12: inconsistent IS_ERR and PTR_ERR on line 490.

---
 drivers/i2c/busses/i2c-xgene-slimpro.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-xgene-slimpro.c +1 -1
index 1a19ebad60ad..63259b3ea5ab 100644
@@ -487,7 +487,7 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
 		pcc_chan = pcc_mbox_request_channel(cl, ctx->mbox_idx);
 		if (IS_ERR(pcc_chan)) {
 			dev_err(&pdev->dev, "PCC mailbox channel request failed\n");
-			return PTR_ERR(ctx->pcc_chan);
+			return PTR_ERR(pcc_chan);
 		}
 
 		ctx->pcc_chan = pcc_chan;
Signature · 1 line
2.20.1
#1 lore raw

Hi Wan,

Quoted 3 lines · Wan Jiabing

Fix following coccicheck warning:
./drivers/i2c/busses/i2c-xgene-slimpro.c:488:6-12: inconsistent IS_ERR and PTR_ERR on line 490.

There is another version @[1]. Thanks for the effort.

Hi Wolfram,

Can you pick [1] after -rc1 ? I see mailbox updates are in the mainline already.

Signature · 4 lines
Regards,
Sudeep

[1] https://lore.kernel.org/kernel-janitors/[email protected]/