From: Dan Carpenter <error27@gmail.com>
To: Wang Zhang <silver_code@hust.edu.cn>
Cc: Peter Korsgaard <peter@korsgaard.com>,
Andrew Lunn <andrew@lunn.ch>,
hust-os-kernel-patches@googlegroups.com,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] i2c: ocores: add missing unwind goto in `ocores_i2c_probe`
Date: Tue, 18 Apr 2023 10:15:03 +0300 [thread overview]
Message-ID: <2bbc856b-c65a-4b42-8193-3a990e2155c0@kili.mountain> (raw)
In-Reply-To: <82673cff-6571-43fc-9b64-3af2c72593c3@kili.mountain>
On Tue, Apr 18, 2023 at 08:45:20AM +0300, Dan Carpenter wrote:
> On Tue, Apr 18, 2023 at 01:38:13PM +0800, Wang Zhang wrote:
> > Smatch Warns:
> > drivers/i2c/busses/i2c-ocores.c:701 ocores_i2c_probe() warn:
> > missing unwind goto?
> >
> > The error handling code after the err_clk label should be executed to
> > release any resources that were allocated for the clock if a negative
> > error code returned after platform_get_irq_optional.
> >
> > Fix this by changing the direct return to `goto err_clk`.
> >
> > Signed-off-by: Wang Zhang <silver_code@hust.edu.cn>
> > ---
> > v2->v3: the first patch had issues. Just do a much simpler fix. No need
> > to add the check. clk_disable_unprepare() has checks for error pointer
> > and NULL already.
> > v1->v2: change `ocores_i2c_of_probe` to use `devm_clk_get_enabled()`
>
> I meant send it to the public mailing list. Don't add the other
> comments which are related to discussions on this list. Just say that
> the public 1 was buggy and the this new v2 patch is simpler.
Oh, sorry, this was to the public list. Never mind. (Technically both
lists are public).
Some of the notes in --- change log are probably confusing to the people
who aren't on the hust-os-kernel-patches@googlegroups.com list... Maybe
it's only confusing to me... LOL. But the patch itself is straight
forward.
regards,
dan carpenter
next prev parent reply other threads:[~2023-04-18 7:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 5:38 [PATCH v3] i2c: ocores: add missing unwind goto in `ocores_i2c_probe` Wang Zhang
2023-04-18 5:45 ` Dan Carpenter
2023-04-18 7:15 ` Dan Carpenter [this message]
2023-04-25 10:31 ` 张网
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=2bbc856b-c65a-4b42-8193-3a990e2155c0@kili.mountain \
--to=error27@gmail.com \
--cc=andrew@lunn.ch \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@korsgaard.com \
--cc=silver_code@hust.edu.cn \
/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