From: Greg KH <gregkh@linuxfoundation.org>
To: Mingwei Zheng <zmw12306@gmail.com>
Cc: u.kleine-koenig@baylibre.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: Re: [PATCH] usb: gadget: m66592-udc: Add check for clk_enable()
Date: Mon, 23 Dec 2024 18:30:36 +0100 [thread overview]
Message-ID: <2024122307-thaw-payback-b175@gregkh> (raw)
In-Reply-To: <CAN4iqtQGJw+Nyt_K+uMSfpqXhfzGN4nLmFTPdEydyAf_wsWMog@mail.gmail.com>
On Tue, Dec 17, 2024 at 10:06:26PM -0500, Mingwei Zheng wrote:
> Hi Greg,
>
> On Mon, Dec 16, 2024 at 2:56 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Sun, Dec 15, 2024 at 03:53:58PM -0500, Mingwei Zheng wrote:
> > > Add check for the return value of clk_enable() to catch the potential
> > > error.
> > >
> > > Fixes: b4822e2317e8 ("usb: gadget: m66592-udc: Convert to use module_platform_driver()")
> > > Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
> > > Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
> >
> > Why this order of signed-off-by lines? Shouldn't yours be last? Who
> > wrote this patch?
> >
>
> I listed two names because both of us co-authored this patch.
>
> > > ---
> > > drivers/usb/gadget/udc/m66592-udc.c | 6 +++++-
> > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c
> > > index a938b2af0944..bf408476a24c 100644
> > > --- a/drivers/usb/gadget/udc/m66592-udc.c
> > > +++ b/drivers/usb/gadget/udc/m66592-udc.c
> > > @@ -1606,7 +1606,11 @@ static int m66592_probe(struct platform_device *pdev)
> > > ret = PTR_ERR(m66592->clk);
> > > goto clean_up2;
> > > }
> > > - clk_enable(m66592->clk);
> > > + ret = clk_enable(m66592->clk);
> > > + if (ret) {
> > > + clk_put(m66592->clk);
> > > + goto clean_up2;
> > > + }
> >
> > How did you find this and how was it tested?
> >
> > thanks,
> >
> > greg k-h
>
> We found it through a static analysis tool.
Then you need to properly document that as our documentation says it is
required, right?
thanks,
greg k-h
next prev parent reply other threads:[~2024-12-23 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 20:53 [PATCH] usb: gadget: m66592-udc: Add check for clk_enable() Mingwei Zheng
2024-12-16 7:55 ` Greg KH
2024-12-18 3:06 ` Mingwei Zheng
2024-12-23 17:30 ` Greg KH [this message]
2024-12-26 1:35 ` Mingwei Zheng
-- strict thread matches above, loose matches on Subject: below --
2024-12-24 20:22 Mingwei Zheng
2024-12-26 8:19 ` Greg KH
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=2024122307-thaw-payback-b175@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jiashengjiangcool@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=zmw12306@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).