From patchwork Tue Sep 26 11:34:43 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: 9971779 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 53CC86037F for ; Tue, 26 Sep 2017 11:35:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FEE228EB1 for ; Tue, 26 Sep 2017 11:35:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44C2328EB5; Tue, 26 Sep 2017 11:35:02 +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 F0EB428EB1 for ; Tue, 26 Sep 2017 11:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964826AbdIZLeu (ORCPT ); Tue, 26 Sep 2017 07:34:50 -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 Received: from [192.168.1.2] ([78.54.205.15]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MUW7T-1dnlRf105r-00RDrT; Tue, 26 Sep 2017 13:34:44 +0200 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-Language: en-GB 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-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: 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);