From patchwork Sun Sep 3 14:03:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9936371 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 9D7586038C for ; Sun, 3 Sep 2017 14:03:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E6DF28657 for ; Sun, 3 Sep 2017 14:03:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 816422866E; Sun, 3 Sep 2017 14:03:57 +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=unavailable 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 360AF28657 for ; Sun, 3 Sep 2017 14:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752954AbdICODo (ORCPT ); Sun, 3 Sep 2017 10:03:44 -0400 Received: from mout.web.de ([212.227.15.4]:58097 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752853AbdICODm (ORCPT ); Sun, 3 Sep 2017 10:03:42 -0400 Received: from [192.168.1.2] ([78.48.243.242]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MUBPu-1dxxQS3vEo-00R0OI; Sun, 03 Sep 2017 16:03:27 +0200 Subject: [PATCH 2/2] [media] meye: Adjust two function calls together with a variable assignment From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Masahiro Yamada , Mauro Carvalho Chehab , Pan Bian , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <4370c644-e440-1268-089b-8a8686bbcd5c@users.sourceforge.net> Message-ID: <7f538823-de13-4246-7482-fcc889385328@users.sourceforge.net> Date: Sun, 3 Sep 2017 16:03:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <4370c644-e440-1268-089b-8a8686bbcd5c@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Jf3H+NwobDmZmZzDj1KQSTy088qkZG8SxbLQXENsf+i/bX21YrS P5rNAtCmiN433x9pUVxsMa2XHR/ghmsUiMGIYaVolea17VCia7EDzvCSUnpvysr6jrF9GJy 6HeU9PvwWdVZsFQsoE/LG+KmZ5gMQOGRdoe3G9FTtxP/lD5w84RFcHl4s7qhoN/Jf5HKrPb 6YkPFgmomdM7b2KhLBSSA== X-UI-Out-Filterresults: notjunk:1; V01:K0:P5J5a6YRGaU=:m3wvbfQ6RWTN8r9gA6gksx rExlGMHPWRM/BpbO8nPgwVYOas2C0cPFffT/lB5VVSv3qBaYd7VMB/sxWJjxGqDiaqYiWNxqT AgRxilXiKZHo8dm9ppvOldVEfclWADgp/XDZ36leERV6vlhRnn63WqYL8bpkKCeTqeRQkZCju KO4MPw/fRYbmy/CzD08vi0b0lXFfoCuGVDg5RvlHrT9Zlb/4+CXghaw2CMnk015g9iMip5q3x ddSyYHqUREwQJ7XDFEyuAUpWMtElycIWtxLYiOZo71s0mXHR+NnScjbLbCG9JNl5UyW4dqP66 vr3jGZx0R5OaN6uWarFLMwytG9mCyAkBBxQj7rb+wFu6yd6lOYw0FHtjnnSwM+NoF1aM7IjfH ESHD2SEHRdn84KGeOQM703bgXe0Z4CO3qMKrmxGtxClCID3zm/KMNBZ7ZvZPeehjUjHfLK69g 8iuIi+IVvxQRGTLjypR7D+sowY6mQKeINk5fGAvyGDJpIGj43Wjao9eU4NWffk85bdwfFBYQN l08mhts70w6mr5O1CDs5oupLy9wAfCVPYQvAsaNbf9uI1HMZ4xfwbQngKoyWOEPXNUAHQ3Qxz or1e+vZV4uhUOhl8Cr6G0q1dRMBnHW3Tu7UnctXekw790XZHXc32cjq+avuECeuSiHXVK1HTj tRQHCY83P8VY2493de90DldkdirbR4JBEA16BKFBf9xUalj7fvz4DQP8+hmyYR0t7yiqnrN+f mRAwNyclQ3X0LXQzqjLITuusjNaoQAjAXgAylExSTxgC4ZAyKVF+XpLqSMbOHdwfHyS29TEp/ vwN9R3nCHGvaCMWWIl5IrVsI1ikDVhHt9Ope9xtqmKxiv5jB+I= 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, 3 Sep 2017 15:41:53 +0200 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/media/pci/meye/meye.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index db36040770a6..9b69a07c1d5b 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c @@ -1642,14 +1642,15 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) meye.vdev = meye_template; meye.vdev.v4l2_dev = &meye.v4l2_dev; - ret = -EIO; - if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) { + ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1); + if (ret) { v4l2_err(v4l2_dev, "meye: unable to power on the camera\n"); v4l2_err(v4l2_dev, "meye: did you enable the camera in sonypi using the module options ?\n"); goto outsonypienable; } - if ((ret = pci_enable_device(meye.mchip_dev))) { + ret = pci_enable_device(meye.mchip_dev); + if (ret) { v4l2_err(v4l2_dev, "meye: pci_enable_device failed\n"); goto outenabledev; }