mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "lizhengyu (E)" <lizhengyu3@huawei.com>
To: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb <linux-usb@vger.kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] usb: host: ohci-tmio: Remove redundant if statement
Date: Thu, 19 May 2022 09:39:26 +0800	[thread overview]
Message-ID: <ab630ed0-25c5-cc92-34c3-a68c0af160df@huawei.com> (raw)
In-Reply-To: <CALT56yO_ek55BGX4cKuTim2gWwQp7EXUFyh332MPYHPdi7xEWw@mail.gmail.com>

On Wed, 18 May 2022 18:30:15 +0300, Dmitry Baryshkov 
<dbaryshkov@gmail.com> wrote:
> ср, 18 мая 2022 г. в 05:45, Li Zhengyu <lizhengyu3@huawei.com>:
>> (ret == 0) is true when (ret) is false, so remove it.
>> Also remove unreachable code.
>>
>> Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
>> ---
>>   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);
> I think the proper patch would be to check the return value of
> device_wakeup_enable(), so NAK.
>
>> -       if (ret == 0)
>> -               return ret;
>> -
>> -       usb_remove_hcd(hcd);
>> +       return ret;
>>
>>   err_add_hcd:
>>          tmio_stop_hc(dev);
>> --
>> 2.17.1
>>
>
Thanks, I will fix it soon.

      reply	other threads:[~2022-05-19  1:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  2:43 Li Zhengyu
2022-05-18 14:17 ` Alan Stern
2022-05-18 15:30 ` Dmitry Baryshkov
2022-05-19  1:39   ` lizhengyu (E) [this message]

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=ab630ed0-25c5-cc92-34c3-a68c0af160df@huawei.com \
    --to=lizhengyu3@huawei.com \
    --cc=dbaryshkov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®