Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936875AbdIZLdq (ORCPT ); Tue, 26 Sep 2017 07:33:46 -0400 Received: from mout.web.de ([217.72.192.78]:54318 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934463AbdIZLdp (ORCPT ); Tue, 26 Sep 2017 07:33:45 -0400 Subject: [PATCH 5/6] [media] tda8261: Adjust three function calls together with a variable assignment From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Max Kellermann Cc: LKML , kernel-janitors@vger.kernel.org References: <15d74bee-7467-4687-24e1-3501c22f6d75@users.sourceforge.net> Message-ID: <8e60d1bf-ebdb-a9f8-8cf2-3dee7a1c4c96@users.sourceforge.net> Date: Tue, 26 Sep 2017 13:33:39 +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: <15d74bee-7467-4687-24e1-3501c22f6d75@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ewmrOVwbOlxfJHw2VFsef9RIV3MeRuuf3hHCQf0YXGFSSSRfl/m YjYHHQMrxH6Qd+LOta/QCQy8ep5l0d9mZFLw7l6xqij9OemqTRCQ4IjKnrs6P5ANWo7zy3t Dh4KQDoPct2eWWxsCODcsNeMlJobhzac8RFLfkTxzjpC6sIu195fptd2aT+C8hgoOoqpNTA /LKxiFvB1WGP8Tgx1AVTQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:GSQh2Xj7TkM=:fZaCbDHDIQxAQGWqlCiax7 sP8XzlhwXjsDwQIL4eLqOt5W6tECEXmVYQrNc18Rs2zloN3EgMVym+YoUIZUBFVukdOMeyhDo 8u1K+D5BaLb2Uh/Ba98ORSw0o24DZ7EWZwsVtJPXPs7tq1boQWrs130URjmlN5CC6hnO6SP8A YLlNeV87Mw0roWYul85yhLGSvbG6hHgHjkD6ens+LG23TVjw42kb7s6gFdca5RuZCYn7jPOGU pieWjaAdMD989xiLAzB+AVP1mWe2ObLjJ1TGEUHdpZDzeUqD7oI6XFeud3I+U3Qm0sph0wi/9 z/95SOHzy47YnzXwPFDyUAfnhDcxMH3RPjvLjREGYG2YI8+j6MdShw/VItK0XG2nVnfjC+49S WtT0MVbsXCxhhc02WRyNvozpRKeRtyH7vN6gC0sDXcfuEkBq+UjP0krkY96xJFPyTFToUYQCH D0c2UV8ZkKwK5NteAR+22Eu6Z1p3vnNSFMYTiCcVpDACW0eppdi/TROY2v5NFIauq52HqzNRh uvuPFkubBDjCQZXhxpiLdndtM/0A66c6b1t7LN2WBvzjn95ywEufY/Lw/XQCPby3NHHdu1yCy 8QPsUb5eBReoDJxmgXa0KmIa4b15llGzd5ZgVgdZftC7uHEDKikK0oVcSLh+bF2tWds52m1wU H5LjuoMWL0mp3tg/D+3d6npYNEum5Rbd627o6q47rZkUBxjY/H07Hd68hyKZn5J8dT5xz6n56 fy/gXOP08QcEIX/6FPYEl/GLzo3iAKsqCDzMBks7i7Z1DcYKrr60yBtzu7ElFnbxdcP6Ma0pr bw3qlwkeS3Yk0EswMocPLL+SY4p8Hz0VLzfRRdz1PduNd0V2uY= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1673 Lines: 51 From: Markus Elfring Date: Tue, 26 Sep 2017 12:52:24 +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/dvb-frontends/tda8261.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/tda8261.c b/drivers/media/dvb-frontends/tda8261.c index 492d8c03a5fa..20185ee8f253 100644 --- a/drivers/media/dvb-frontends/tda8261.c +++ b/drivers/media/dvb-frontends/tda8261.c @@ -42,7 +42,8 @@ static int tda8261_read(struct tda8261_state *state, u8 *buf) int err = 0; struct i2c_msg msg = { .addr = config->addr, .flags = I2C_M_RD,.buf = buf, .len = 1 }; - if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) + err = i2c_transfer(state->i2c, &msg, 1); + if (err != 1) pr_err("%s: read error, err=%d\n", __func__, err); return err; @@ -54,7 +55,8 @@ static int tda8261_write(struct tda8261_state *state, u8 *buf) int err = 0; struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 }; - if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) + err = i2c_transfer(state->i2c, &msg, 1); + if (err != 1) pr_err("%s: write error, err=%d\n", __func__, err); return err; @@ -67,8 +69,8 @@ static int tda8261_get_status(struct dvb_frontend *fe, u32 *status) int err = 0; *status = 0; - - if ((err = tda8261_read(state, &result)) < 0) { + err = tda8261_read(state, &result); + if (err < 0) { pr_err("%s: I/O Error\n", __func__); return err; } -- 2.14.1