From patchwork Wed Mar 7 10:13:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10263741 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 376D76016D for ; Wed, 7 Mar 2018 10:13:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26E9B29440 for ; Wed, 7 Mar 2018 10:13:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BBF32945E; Wed, 7 Mar 2018 10:13:47 +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=ham 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 C19B429440 for ; Wed, 7 Mar 2018 10:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754377AbeCGKNp (ORCPT ); Wed, 7 Mar 2018 05:13:45 -0500 Received: from osg.samsung.com ([64.30.133.232]:49211 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754364AbeCGKNm (ORCPT ); Wed, 7 Mar 2018 05:13:42 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 732683DED7; Wed, 7 Mar 2018 02:13:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O8P5ZUzKgYid; Wed, 7 Mar 2018 02:13:41 -0800 (PST) Received: from smtp.s-opensource.com (177.43.25.174.dynamic.adsl.gvt.net.br [177.43.25.174]) by osg.samsung.com (Postfix) with ESMTPSA id 71C633DEBC; Wed, 7 Mar 2018 02:13:40 -0800 (PST) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1etW4n-00030w-Kw; Wed, 07 Mar 2018 05:13:37 -0500 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Yasunari Takiguchi Subject: [PATCH 2/3] media: cxd2880: don't return unitialized values Date: Wed, 7 Mar 2018 05:13:35 -0500 Message-Id: <9ca4897be5adef66b8fe384b4365ce385e83582f.1520417613.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) 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 drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c:59 cxd2880_io_spi_read_reg() error: uninitialized symbol 'ret'. drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c:111 cxd2880_io_spi_write_reg() error: uninitialized symbol 'ret'. drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c:2985 cxd2880_tnrdmd_set_cfg() error: uninitialized symbol 'ret'. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c | 4 ++-- drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c index d2e37c95d748..aba59400859e 100644 --- a/drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_devio_spi.c @@ -16,7 +16,7 @@ static int cxd2880_io_spi_read_reg(struct cxd2880_io *io, u8 sub_address, u8 *data, u32 size) { - int ret; + int ret = 0; struct cxd2880_spi *spi = NULL; u8 send_data[6]; u8 *read_data_top = data; @@ -64,7 +64,7 @@ static int cxd2880_io_spi_write_reg(struct cxd2880_io *io, u8 sub_address, const u8 *data, u32 size) { - int ret; + int ret = 0; struct cxd2880_spi *spi = NULL; u8 send_data[BURST_WRITE_MAX + 4]; const u8 *write_data_top = data; diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c index 25851bbb846e..4cf2d7cfd3f5 100644 --- a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd.c @@ -2503,7 +2503,7 @@ int cxd2880_tnrdmd_set_cfg(struct cxd2880_tnrdmd *tnr_dmd, enum cxd2880_tnrdmd_cfg_id id, int value) { - int ret; + int ret = 0; u8 data[2] = { 0 }; u8 need_sub_setting = 0;