* [PATCH v1] drivers: usb: remove duplicate logical judgments in if
@ 2023-07-04 10:40 Minjie Du
2023-07-05 6:19 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: Minjie Du @ 2023-07-04 10:40 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, open list:GO7007 MPEG CODEC,
open list
Cc: opensource.kernel, Minjie Du
Fix: delate duplicate judgments
Does the judgment content of this if
mean requesting confirmation twice?
I'm not sure, Could you help check it out?
Thank you!
Signed-off-by: Minjie Du <duminjie@vivo.com>
---
drivers/media/usb/go7007/go7007-usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c
index eeb85981e..c85e48e16 100644
--- a/drivers/media/usb/go7007/go7007-usb.c
+++ b/drivers/media/usb/go7007/go7007-usb.c
@@ -653,8 +653,7 @@ static int go7007_usb_interface_reset(struct go7007 *go)
if (usb->board->flags & GO7007_USB_EZUSB) {
/* Reset buffer in EZ-USB */
pr_debug("resetting EZ-USB buffers\n");
- if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 ||
- go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
+ if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
return -1;
/* Reset encoder again */
--
2.39.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] drivers: usb: remove duplicate logical judgments in if
2023-07-04 10:40 [PATCH v1] drivers: usb: remove duplicate logical judgments in if Minjie Du
@ 2023-07-05 6:19 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2023-07-05 6:19 UTC (permalink / raw)
To: Minjie Du, Mauro Carvalho Chehab, open list:GO7007 MPEG CODEC, open list
Cc: opensource.kernel
Hi Minjie,
On 04/07/2023 12:40, Minjie Du wrote:
> Fix: delate duplicate judgments
> Does the judgment content of this if
> mean requesting confirmation twice?
> I'm not sure, Could you help check it out?
> Thank you!
From what I can tell it tries to send the reset request a
second time if the first attempt fails. Fair enough.
So let's leave this as-is.
Regards,
Hans
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
> drivers/media/usb/go7007/go7007-usb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c
> index eeb85981e..c85e48e16 100644
> --- a/drivers/media/usb/go7007/go7007-usb.c
> +++ b/drivers/media/usb/go7007/go7007-usb.c
> @@ -653,8 +653,7 @@ static int go7007_usb_interface_reset(struct go7007 *go)
> if (usb->board->flags & GO7007_USB_EZUSB) {
> /* Reset buffer in EZ-USB */
> pr_debug("resetting EZ-USB buffers\n");
> - if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 ||
> - go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
> + if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
> return -1;
>
> /* Reset encoder again */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-05 6:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 10:40 [PATCH v1] drivers: usb: remove duplicate logical judgments in if Minjie Du
2023-07-05 6:19 ` Hans Verkuil
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®