From: Bjorn Andersson Date: Sun, 17 Jul 2022 03:50:25 +0000 (-0700) Subject: i2c: qcom-geni: Use the correct return value X-Git-Tag: v6.0-rc1~140^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3f0ceb7c2037c6e3affd7d9c84ac5f97af7a5b5;p=thirdparty%2Fkernel%2Flinux.git i2c: qcom-geni: Use the correct return value The introduction of GPI support moved things around and instead of returning the result from geni_i2c_xfer() the number of messages in the request was returned, ignoring the actual result. Fix this. Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Signed-off-by: Bjorn Andersson Reviewed-by: Andrew Halaney Reviewed-by: Vinod Koul Reviewed-by: Johan Hovold Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index c189b8fbc578d..6ac179a373ff2 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -698,7 +698,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, pm_runtime_put_autosuspend(gi2c->se.dev); gi2c->cur = NULL; gi2c->err = 0; - return num; + return ret; } static u32 geni_i2c_func(struct i2c_adapter *adap)