[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ab630ed0-25c5-cc92-34c3-a68c0af160df@huawei.com>
Date: Thu, 19 May 2022 09:39:26 +0800
From: "lizhengyu (E)" <lizhengyu3@...wei.com>
To: Dmitry Baryshkov <dbaryshkov@...il.com>
CC: Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb <linux-usb@...r.kernel.org>,
kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] usb: host: ohci-tmio: Remove redundant if statement
On Wed, 18 May 2022 18:30:15 +0300, Dmitry Baryshkov
<dbaryshkov@...il.com> wrote:
> ср, 18 мая 2022 г. в 05:45, Li Zhengyu <lizhengyu3@...wei.com>:
>> (ret == 0) is true when (ret) is false, so remove it.
>> Also remove unreachable code.
>>
>> Signed-off-by: Li Zhengyu <lizhengyu3@...wei.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.
Powered by blists - more mailing lists