From patchwork Sun Sep 3 20:37:21 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: 9936585 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 AC6A66038C for ; Sun, 3 Sep 2017 20:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E5012863D for ; Sun, 3 Sep 2017 20:38:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92DEC286AC; Sun, 3 Sep 2017 20:38:10 +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 2CB8A2863D for ; Sun, 3 Sep 2017 20:38:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752466AbdICUhm (ORCPT ); Sun, 3 Sep 2017 16:37:42 -0400 Received: from mout.web.de ([212.227.15.14]:55521 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130AbdICUhl (ORCPT ); Sun, 3 Sep 2017 16:37:41 -0400 Received: from [192.168.1.2] ([78.48.243.242]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LvSQV-1dP4U51fgR-010cpY; Sun, 03 Sep 2017 22:37:22 +0200 Subject: [PATCH 7/7] [media] Hexium Orion: Adjust one function call together with a variable assignment From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Message-ID: Date: Sun, 3 Sep 2017 22:37:21 +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: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Oj2q0j8FUjr+GIcBmeqji+cDCJ0BiqDktBeet8aLpb+LLPptbEV lN5CVnAywKxvxI+HfC3a4OqB4dVoaoUOZE0nV48jcIe+CcQYKcotfEJ0IXC38GxCbTvnl/b vGdYB+TaIYMvgpQWkMiO1Mc0XoItYPZbV2d/aRfdcUcTU50aYKcm5KihY8atFdUWsY91uGz 9EkpCW+TejnSCPFdCT26A== X-UI-Out-Filterresults: notjunk:1; V01:K0:VqjfNG1a1p8=:24F2mAbpLKEHlkdX11gO73 IO1ch2xnCNXN/g1Mc2ChVqlfGzAJQAf0v400sLOoMMKlS77eJcenfhfnqCNErue8/TaZVEwT4 w8tbohe3VVdYSfrRzh35gPF/SjX2y1QYalHsdlRjZAGe7A/tiGOJNsiViUuptHezxjkn7/hzK gCzWOgcjrEVKN4f2pgOSEL/h0h6SsMBdF9Pg2XQw+otDq1l8x4Gcc+HYIUI3KC16Qnti7vD6Z K9WJKG8hiTdLAY+C+ZMVHQb5WJfZrlJc0ppPxDmo0xrErvJS717ZmQhjYPqqLquubYh+nN+sO m4F+OeS0btrAYU38p6PhPpngyUFQlUc6JzJciDyaU/74FYWbPUB1zeoJHW0i+zyykFsCUjStV Xfc/hIWmpirEOIPyRj0rFHrwO0YpIhE0vOBQ294bJ7WDd8sHPKzMDaI6c+IYqGzdI/Q6y5p3J anfaKzWq2HkzppllDQhhqVT+BV6IoUNiTc6+ok5hEbqND5ffsd/51al+/4r1ranNq/tEpNRM9 R1pektoYXKY0LMkbyh+W6hQfH9omzk5/9kAJCirZtp5iWDcgaynw28uvQQ59dnethTuCEcxec Jpxy0EpIJvtv14B+Ha6a1wav76qRKjH8Wy6rqA6jAkNscVYsWnDg354TVDh5yPZzolWUlQKT/ 3O6uW68Vgl0EeK88WcQRpxv/Urh9drcpyG6haQ6BIhecPJFwl/6DUZqHSPOrJpw8I5sJSLgxb z5N/66Yik5aaWSeliBYl4gG1cc0DwjuhhI6ydUsT6Fo5VE0+ubPaofD011ybwhlo7oZU0OYvz h2vukKKKEzAF2t3gd+oiiTSfcQi9guEh8aX9rnR/j3FpuGsFDg= 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 20:12:36 +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 place. Signed-off-by: Markus Elfring --- drivers/media/pci/saa7146/hexium_orion.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c index 187e072a3697..691472763696 100644 --- a/drivers/media/pci/saa7146/hexium_orion.c +++ b/drivers/media/pci/saa7146/hexium_orion.c @@ -266,7 +266,9 @@ static int hexium_probe(struct saa7146_dev *dev) /* check if this is an old hexium Orion card by looking at a saa7110 at address 0x4e */ - if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { + err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, + 0x00, I2C_SMBUS_BYTE_DATA, &data); + if (err == 0) { pr_info("device is a Hexium HV-PCI6/Orion (old)\n"); /* we store the pointer in our private data field */ dev->ext_priv = hexium;