[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ytz1LUSwyZ/8LiN6@hovoldconsulting.com>
Date: Sun, 24 Jul 2022 09:30:53 +0200
From: Johan Hovold <johan@...nel.org>
To: Wolfram Sang <wsa@...nel.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Vinod Koul <vkoul@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] i2c: qcom-geni: Use the correct return value
On Sun, Jul 24, 2022 at 07:04:12AM +0200, Wolfram Sang wrote:
>
> > - return num;
> > + return ret;
>
> Not quite. Kdoc describes the retval in i2c_transfer.
>
> 2136 * i2c_transfer - execute a single or combined I2C message
> 2137 * @adap: Handle to I2C bus
> 2138 * @msgs: One or more messages to execute before STOP is issued to
> 2139 * terminate the operation; each message begins with a START.
> 2140 * @num: Number of messages to be executed.
> 2141 *
> 2142 * Returns negative errno, else the number of messages executed.
And this is exactly what the driver is returning after this fix.
Note that ret above is assigned based on the return value from two
helper functions that return either a negative errno or the number
messages executed.
So I believe this patch is still needed to fix the error handling.
Reviewed-by: Johan Hovold <johan+linaro@...nel.org>
Johan
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists