From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C2D9FA373E for ; Tue, 25 Oct 2022 18:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231889AbiJYSzH (ORCPT ); Tue, 25 Oct 2022 14:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbiJYSzD (ORCPT ); Tue, 25 Oct 2022 14:55:03 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 754F640028; Tue, 25 Oct 2022 11:55:02 -0700 (PDT) Received: from pendragon.ideasonboard.com (85-76-12-207-nat.elisa-mobile.fi [85.76.12.207]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D85E8A9; Tue, 25 Oct 2022 20:54:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1666724091; bh=ojt4ficiai+RSRwiEz4aeo0qgLvpTF98fJ39GhQ546w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rSAtmOmAnJ+cm2ZGCb5bhRDq6tw9TpAj3gOQB+ZAZ8pLx0bX+X42cXoWNWdaes36G UdYycFsDUJYpkoV/eVhMCe7kKxNixQ3/kZOUdNz2QX/ktwfWWEmJkikyPYeiZLVADU HpZt/cXxlVaKyEOVX4rB8LLppyboLmvo41y/OYKE= Date: Tue, 25 Oct 2022 21:54:21 +0300 From: Laurent Pinchart To: Ricardo Ribalda Cc: Pedro Guilherme Siqueira Moreira , 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 Message-ID: References: <20221025050450.1743072-1-pedro.guilherme@espectro.eng.br> <20221025050450.1743072-2-pedro.guilherme@espectro.eng.br> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > > Reviewed-by: Ricardo Ribalda Likewise, this looks good to me. Reviewed-by: Laurent Pinchart > > --- > > 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