From: UTTKARSH AGGARWAL <quic_uaggarwa@quicinc.com>
To: Kuen-Han Tsai <khtsai@google.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: Re: [RFC PATCH] usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend
Date: Wed, 17 Jan 2024 14:52:14 +0530 [thread overview]
Message-ID: <77ffee9a-cd77-6a09-10ee-bdf17bfca5ec@quicinc.com> (raw)
In-Reply-To: <CAKzKK0qJOz_+pNAVAD8Ub6TZ9uhFOzuDC_bws9MVzxNa7RqYhA@mail.gmail.com>
On 1/17/2024 12:47 PM, Kuen-Han Tsai wrote:
>> ret = dwc3_gadget_soft_disconnect(dwc);
>> if (ret)
>> goto err;
> For improved readability, we can remove the goto statement and move
> the error handling logic here.
Hi Kuen-Han,
Thanks for the suggestion.
Does this looks good to you ?
int ret = dwc3_gadget_soft_disconnect(dwc); if (ret) { if
(dwc->softconnect) dwc3_gadget_soft_connect(dwc);
return ret; } spin_lock_irqsave(&dwc->lock, flags); if
(dwc->gadget_driver) dwc3_disconnect_gadget(dwc);
spin_unlock_irqrestore(&dwc->lock, flags);
Thanks,
Uttkarsh
next prev parent reply other threads:[~2024-01-17 9:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 9:55 [RFC PATCH] usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend Uttkarsh Aggarwal
2024-01-17 1:19 ` Thinh Nguyen
2024-01-17 6:36 ` UTTKARSH AGGARWAL
2024-01-17 6:49 ` Kuen-Han Tsai
2024-01-17 7:17 ` Kuen-Han Tsai
2024-01-17 9:22 ` UTTKARSH AGGARWAL [this message]
2024-01-17 9:35 ` UTTKARSH AGGARWAL
2024-01-17 12:16 ` Kuen-Han Tsai
2024-01-18 0:56 ` Thinh Nguyen
2024-01-18 8:46 ` UTTKARSH AGGARWAL
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=77ffee9a-cd77-6a09-10ee-bdf17bfca5ec@quicinc.com \
--to=quic_uaggarwa@quicinc.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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