i2c: qcom-geni: Use the correct return value
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 17 Jul 2022 03:50:25 +0000 (20:50 -0700)
committerWolfram Sang <wsa@kernel.org>
Sun, 24 Jul 2022 18:35:18 +0000 (20:35 +0200)
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 <bjorn.andersson@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-qcom-geni.c

index c189b8fbc578d5ed5c1f71fd200309d68c93e675..6ac179a373ff2db22489bad743e850fd4d0dd5ca 100644 (file)
@@ -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)