Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967576AbdIZLev (ORCPT ); Tue, 26 Sep 2017 07:34:51 -0400 Received: from mout.web.de ([212.227.17.12]:60947 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934463AbdIZLet (ORCPT ); Tue, 26 Sep 2017 07:34:49 -0400 Subject: [PATCH 6/6] [media] tda8261: Delete an unnecessary variable initialisation in three functions 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: <78d9ff22-6bc0-ae3f-9930-e9606536c859@users.sourceforge.net> Date: Tue, 26 Sep 2017 13:34:43 +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:NglJulXrgUy8P3ilJiGgOtrZmBAhX9UgKMyNrbUeSd2M2eZ8dz+ zV96w5GNc9Cf6KOxiCRbFkpLZBqAx19FQVPy+fn3qy2WG+ci4t7El9CtFO+wceZxn4x0ucg D9LvJY32vdQdIW8tIIFRcJtxzhhcinLNGSpSutq59XuP72LdfcyEFg4RGXMk/q5TkBo04MK U2LsOYkJ/9BENRU3XRVeA== X-UI-Out-Filterresults: notjunk:1;V01:K0:B3mzIQntXxg=:6noEtSYdDwyN5PCRzACdf+ SwwtO813FWJskg179vD8gyhFGuHIzttEB77xSUbASM/6FBup7cGK3a96CQ2Ry93Iwk2ZZlpLD SdsTChr6vc2zyXktvpzx8GFnLFendWeSgZSqN8i9fcA/tGQY848RevQ0ysLXA+v0rdXgRHFWl y/DYvzzwtu5EIPMu4TkihONCSBQkUogVtLv0A+sP5/C/vaMBWgjxhVOtEqFz19Zda+v4YC8Pb ItY+Te57Mx4H4LjDHQ1yNwLKAB24ikuqQkB3g5xXI/pkp4e4JhfskGVESGasMy5RfhhI8PdwU Zua02zMfX1zSa6SNJ0KPEsjHWOWVZ7XeWf5dLN7YKXnoeD/yBolZVxh7b8TU3W8Pl6kTg/X44 M3CNL1oPTBS2TTt8Hvpvb2UFDji+pH7nY4HRl5MoT3MOoW1ck/R9Vt4m4Sqmuuo/RI9B/35W0 3KNRsUhuU6NbnvKyOYP1auUN1KuhAUlucx3lQmVy+JKeoZfXBNuzkfECbQuxq2X2icBCxuQJM 4cA7ppsJzHWp2Jz5VRxvBGgK9yeQXZBS2sif4ins4qelYAtyipoSWISOSb40NNJqOrlMZ5ezF j+w+ygKRbj6r5tCTWLy/oAPQ5EbaMWYpHJtfD884N43FieG0z0xwTk9HMejAxnC5Qg+3I9KXr 1Ik2YWiYGjKP3+JUq1kuYtJiZ5uAkigfSdFopnq0PxB83EMPYM1W5xRTgiqLbnrpR9GTq1PSR wthxKy6RrSgruew5hEDYKFESPGgSSHILNINNS5urZxjoXmjqMvpmCo4FPL3tVU/WfMc9PiWpc NClCp0BHOE99+5nz6WntIUMOu58uQMm289C/77wSKfxm3KFTWM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1533 Lines: 44 From: Markus Elfring Date: Tue, 26 Sep 2017 12:55:16 +0200 The local variable "err" is reassigned by a statement at the beginning. Thus omit the explicit initialisation in these functions. Signed-off-by: Markus Elfring --- drivers/media/dvb-frontends/tda8261.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/tda8261.c b/drivers/media/dvb-frontends/tda8261.c index 20185ee8f253..33144a34e337 100644 --- a/drivers/media/dvb-frontends/tda8261.c +++ b/drivers/media/dvb-frontends/tda8261.c @@ -39,7 +39,7 @@ struct tda8261_state { static int tda8261_read(struct tda8261_state *state, u8 *buf) { const struct tda8261_config *config = state->config; - int err = 0; + int err; struct i2c_msg msg = { .addr = config->addr, .flags = I2C_M_RD,.buf = buf, .len = 1 }; err = i2c_transfer(state->i2c, &msg, 1); @@ -52,7 +52,7 @@ static int tda8261_read(struct tda8261_state *state, u8 *buf) static int tda8261_write(struct tda8261_state *state, u8 *buf) { const struct tda8261_config *config = state->config; - int err = 0; + int err; struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 }; err = i2c_transfer(state->i2c, &msg, 1); @@ -66,7 +66,7 @@ static int tda8261_get_status(struct dvb_frontend *fe, u32 *status) { struct tda8261_state *state = fe->tuner_priv; u8 result = 0; - int err = 0; + int err; *status = 0; err = tda8261_read(state, &result); -- 2.14.1