public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Pedro Guilherme Siqueira Moreira 
	<pedro.guilherme@espectro.eng.br>,
	mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] media: uvc_driver: fix assignment inside if condition
Date: Tue, 25 Oct 2022 21:54:21 +0300	[thread overview]
Message-ID: <Y1gw3cppUIBIbK34@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CANiDSCs1pQEq73=vuNR9gymLMZFDkS3acDXRPNT=hc=eEvLzSA@mail.gmail.com>

On Tue, Oct 25, 2022 at 10:45:40AM +0200, Ricardo Ribalda wrote:
> On Tue, 25 Oct 2022 at 07:08, Pedro Guilherme Siqueira Moreira
> <pedro.guilherme@espectro.eng.br> wrote:
> >
> > Fixes 'do not use assignment in if condition' errors issued by
> > scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
> >
> > Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
>
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>

Likewise, this looks good to me.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > ---
> >  drivers/media/usb/uvc/uvc_driver.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> > index b591ad823c66..7b6c97ad3a41 100644
> > --- a/drivers/media/usb/uvc/uvc_driver.c
> > +++ b/drivers/media/usb/uvc/uvc_driver.c
> > @@ -1174,7 +1174,8 @@ static int uvc_parse_control(struct uvc_device *dev)
> >                     buffer[1] != USB_DT_CS_INTERFACE)
> >                         goto next_descriptor;
> >
> > -               if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0)
> > +               ret = uvc_parse_standard_control(dev, buffer, buflen);
> > +               if (ret < 0)
> >                         return ret;
> >
> >  next_descriptor:
> > @@ -2213,7 +2214,8 @@ static int uvc_probe(struct usb_interface *intf,
> >         usb_set_intfdata(intf, dev);
> >
> >         /* Initialize the interrupt URB. */
> > -       if ((ret = uvc_status_init(dev)) < 0) {
> > +       ret = uvc_status_init(dev);
> > +       if (ret < 0) {
> >                 dev_info(&dev->udev->dev,
> >                          "Unable to initialize the status endpoint (%d), status interrupt will not be supported.\n",
> >                          ret);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-10-25 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25  5:04 [PATCH v2 1/3] media: uvc_driver: fix missing newline after declarations Pedro Guilherme Siqueira Moreira
2022-10-25  5:04 ` [PATCH v2 2/3] media: uvc_driver: fix assignment inside if condition Pedro Guilherme Siqueira Moreira
2022-10-25  8:45   ` Ricardo Ribalda
2022-10-25 18:54     ` Laurent Pinchart [this message]
2022-10-25  5:04 ` [PATCH v2 3/3] media: uvc_driver: fix usage of symbolic permissions to octal Pedro Guilherme Siqueira Moreira
2022-10-25 14:58   ` Ricardo Ribalda
2022-10-25 18:54     ` Laurent Pinchart
2022-10-25 18:50 ` [PATCH v2 1/3] media: uvc_driver: fix missing newline after declarations Laurent Pinchart
2022-10-25 18:57   ` Laurent Pinchart
2022-10-25 19:48     ` Pedro Guilherme Siqueira Moreira
  -- strict thread matches above, loose matches on Subject: below --
2022-10-25  1:36 [PATCH " Laurent Pinchart
2022-10-25  2:19 ` [PATCH v2 " Pedro Guilherme Siqueira Moreira
2022-10-25  2:19   ` [PATCH v2 2/3] media: uvc_driver: fix assignment inside if condition Pedro Guilherme Siqueira Moreira

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=Y1gw3cppUIBIbK34@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pedro.guilherme@espectro.eng.br \
    --cc=ribalda@chromium.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