Skip to content

Commit c80be25

Browse files
Wei Yongjunwsakernel
authored andcommitted
i2c: xgene-slimpro: Fix wrong pointer passed to PTR_ERR()
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: 7b6da7f ("mailbox: pcc: Use PCC mailbox channel pointer instead of standard") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent fe91c47 commit c80be25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i2c/busses/i2c-xgene-slimpro.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
487487
pcc_chan = pcc_mbox_request_channel(cl, ctx->mbox_idx);
488488
if (IS_ERR(pcc_chan)) {
489489
dev_err(&pdev->dev, "PCC mailbox channel request failed\n");
490-
return PTR_ERR(ctx->pcc_chan);
490+
return PTR_ERR(pcc_chan);
491491
}
492492

493493
ctx->pcc_chan = pcc_chan;

0 commit comments

Comments
 (0)