public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH 2/2] i2c: qcom-geni: Simplify error handling in probe function
Date: Wed, 11 Dec 2024 12:36:41 +0530	[thread overview]
Message-ID: <765f2a3e-a930-407f-83bf-ad3e6b928443@quicinc.com> (raw)
In-Reply-To: <gwl6occrun32l4rmcdrjnzymadhlwixba5eyeznnx462gp7gym@rsvsdjr2zgmp>

Thanks Andi !

On 12/11/2024 12:26 PM, Andi Shyti wrote:
> Hi Mukesh,
> 
> On Wed, Dec 11, 2024 at 09:26:53AM +0530, Mukesh Kumar Savaliya wrote:
>> Thanks Andi for this change !
> 
> Thanks for looking into it.
> 
> ...
> 
>>> @@ -944,8 +938,16 @@ static int geni_i2c_probe(struct platform_device *pdev)
>>>    	return 0;
>> return ret here ? yes, we need to initialize ret = 0.
> 
> here? It's returning '0', as it was before. I'm failing to see
> where 'ret' is used uninitialized. What am I missing?
> 
My point is - Except this place, rest of the places we are returning ret 
OR standard error code. If we return as ret with initializing 0 at the 
start of probe function, it would look good. As such No strict requirement.
>>> +err_off:
>> can we rename as err_resources ?
> 
> yes, it's better, as meaning it's more aligned with the other
> labels.
> 
> Thanks,
> Andi
> 
>>> +	geni_se_resources_off(&gi2c->se);
>>> +err_clk:
>>> +	clk_disable_unprepare(gi2c->core_clk);
>>> +
>>> +	return ret;
>>> +
>>>    err_dma:
>>>    	release_gpi_dma(gi2c);
>>> +
>>>    	return ret;
>>>    }
>>


  reply	other threads:[~2024-12-11  7:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 23:10 [PATCH 0/2] Qcom Geni exit path cleanups Andi Shyti
2024-12-10 23:10 ` [PATCH 1/2] i2c: qcom-geni: Use dev_err_probe in the probe function Andi Shyti
2024-12-10 23:10 ` [PATCH 2/2] i2c: qcom-geni: Simplify error handling in " Andi Shyti
2024-12-11  3:56   ` Mukesh Kumar Savaliya
2024-12-11  6:56     ` Andi Shyti
2024-12-11  7:06       ` Mukesh Kumar Savaliya [this message]
2024-12-11  9:09         ` Andi Shyti
2024-12-12 13:45     ` Andi Shyti
2024-12-12 16:32       ` Mukesh Kumar Savaliya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=765f2a3e-a930-407f-83bf-ad3e6b928443@quicinc.com \
    --to=quic_msavaliy@quicinc.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox