From patchwork Sun Dec 25 18:47:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9488321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB564601D7 for ; Sun, 25 Dec 2016 18:47:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B75F1205B0 for ; Sun, 25 Dec 2016 18:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC4A725250; Sun, 25 Dec 2016 18:47:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DC36205B0 for ; Sun, 25 Dec 2016 18:47:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932541AbcLYSrr (ORCPT ); Sun, 25 Dec 2016 13:47:47 -0500 Received: from mout.web.de ([212.227.17.12]:63199 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932486AbcLYSrp (ORCPT ); Sun, 25 Dec 2016 13:47:45 -0500 Received: from [192.168.1.2] ([77.182.80.223]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M41Bm-1cdZzl2PQY-00rZkj; Sun, 25 Dec 2016 19:47:39 +0100 Subject: [PATCH 15/19] [media] uvc_video: Adjust one function call together with a variable assignment To: linux-media@vger.kernel.org, Laurent Pinchart , Mauro Carvalho Chehab References: <47aa4314-74ec-b2bf-ee3b-aad4d6e9f0a2@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <004f5e95-ac91-d643-d84b-a76e1da92577@users.sourceforge.net> Date: Sun, 25 Dec 2016 19:47:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <47aa4314-74ec-b2bf-ee3b-aad4d6e9f0a2@users.sourceforge.net> X-Provags-ID: V03:K0:kk1XRd/KnH15MMm9YZcd4ibgAhglbsGaaSxie25qQa/Kowphr22 iyJ+DFwB5D3InzfTrgynsKcgB5BDXvOc0IS3aoz2Iftx/yk1dwZrAVEpTYf2ds3DxjSpGYF Tpd9vErkGX+IXVz1j4bRnkB40JqjiGoqxaai4bBW1pEsK+Br6jPNn9anaGSX+9NvPpSC/y8 g8GiqLWipkJCY/rucqD4g== X-UI-Out-Filterresults: notjunk:1; V01:K0:1XUrLAAkW/U=:AGpk+1K+lMDWraaiWAcz2o nO6PDzrAVR7CPTvqkUYpwEoQzwnwt9Ocq5VLvng+IgrS8YzwgD3FeX5og4llsfUNGGNstxfYw gLEPFWY+Iw9c3Pjg6gI89BWey+xVO+WsjdrbpVEdRfzYXWdPIfqOW2CzGcCk1Wy93AatA88/W W6tk/CxkAMLSSWClDrY7LZawb3ZTCoyO+cAX8KG/jn8TAZFeqKdboZ0OgRslweyRf/W3y2dfX f+aWZpW/8c1WijEnNFLT2jAC0ZbHMO8mSzgDmKJ028eoCcQSHdVMoZC2q62ou3J5uH+IIJKLt ex85PN+ubvb7ZYClAEmnwX2sodKrkP3lij4fXRnRBJWQaG5/hDWt12lrMzwWcLRhe7BwfCtjS 8+ah4XSCGWoNwp+YwuQvJeIlWnE0jgxuqd257p03THpE2DAZHqr2ztTQvFNa7jVCLX65v3Ofi 7iDX6kv48JcC3z7yaLd6MZSqpGTpnsplmb+W3/zSIBEQtTF6HrfKRuYM5F4lHZU6Hke1CCACK CcdmYApMK+EwZx0QrYGMwb3y0zIOWZw30Nm/1weR2dchXYnFECmgW/3MJ4Pdo+CMMo10rZC4p 1xXLPPwXh2bIXmZmWwVdXdWaA3ZuNSIh12WFljCXQuVax9UaUvIzgrc0mzu15+gn4UE9UKYC6 mR6ph16C5lRaMHptz7hqwmMliex0gOUk3PdOy8Obu7Auq3YpnfZ77myARm/GnIwXjDsEHSNZK iCPimUbtz7auGmOEKojcahM6pPPtgNR1OvZ1oaK61NDXrvuhDr0X/OOLt/8BJv4HE5xdYQslI tWg2f8q Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 25 Dec 2016 18:00:39 +0100 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index b7fc1762c3da..0ed3453b1c75 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1350,10 +1350,10 @@ static void uvc_video_complete(struct urb *urb) stream->decode(urb, stream, buf); - if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { + ret = usb_submit_urb(urb, GFP_ATOMIC); + if (ret < 0) uvc_printk(KERN_ERR, "Failed to resubmit video URB (%d).\n", ret); - } } /*