From: Alan Stern <stern@rowland.harvard.edu>
To: Li Zhengyu <lizhengyu3@huawei.com>
Cc: dbaryshkov@gmail.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] usb: host: ohci-tmio: Remove redundant if statement
Date: Wed, 18 May 2022 10:17:45 -0400 [thread overview]
Message-ID: <YoUACar4I9X2oJ/A@rowland.harvard.edu> (raw)
In-Reply-To: <20220518024347.213402-1-lizhengyu3@huawei.com>
On Wed, May 18, 2022 at 10:43:47AM +0800, Li Zhengyu wrote:
> (ret == 0) is true when (ret) is false, so remove it.
> Also remove unreachable code.
>
> Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
> ---
Acked-by: Alan Stern <stern@rowland.harvard.edu>
> drivers/usb/host/ohci-tmio.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
> index 49539b9f0e94..6bcb0cb53f7c 100644
> --- a/drivers/usb/host/ohci-tmio.c
> +++ b/drivers/usb/host/ohci-tmio.c
> @@ -243,12 +243,8 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
> ret = usb_add_hcd(hcd, irq, 0);
> if (ret)
> goto err_add_hcd;
> -
> device_wakeup_enable(hcd->self.controller);
> - if (ret == 0)
> - return ret;
> -
> - usb_remove_hcd(hcd);
> + return ret;
>
> err_add_hcd:
> tmio_stop_hc(dev);
> --
> 2.17.1
>
next prev parent reply other threads:[~2022-05-18 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 2:43 [PATCH -next] usb: host: ohci-tmio: Remove redundant if statement Li Zhengyu
2022-05-18 14:17 ` Alan Stern [this message]
2022-05-18 15:30 ` Dmitry Baryshkov
2022-05-19 1:39 ` lizhengyu (E)
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=YoUACar4I9X2oJ/A@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=dbaryshkov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lizhengyu3@huawei.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