From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbdIOIUZ (ORCPT ); Fri, 15 Sep 2017 04:20:25 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:5221 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750838AbdIOIUW (ORCPT ); Fri, 15 Sep 2017 04:20:22 -0400 X-IronPort-AV: E=Sophos;i="5.42,396,1500908400"; d="scan'208";a="257972711" From: Ramesh Shanmugasundaram To: Arnd Bergmann , Mauro Carvalho Chehab CC: Hans Verkuil , "linux-media@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Chris Paterson Subject: RE: [PATCH] [media] rcar_drif: fix potential uninitialized variable use Thread-Topic: [PATCH] [media] rcar_drif: fix potential uninitialized variable use Thread-Index: AQHTLUmyL75dY9Dk8U2IucaZLxgJIaK1m4yA Date: Fri, 15 Sep 2017 08:20:17 +0000 Message-ID: References: <20170914110733.3592437-1-arnd@arndb.de> In-Reply-To: <20170914110733.3592437-1-arnd@arndb.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ramesh.shanmugasundaram@bp.renesas.com; x-originating-ip: [193.141.220.21] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;KL1PR0601MB1335;20:zIK9xPvUs9YXYpimWZHrrpKhZUPk0bbLTgtEtSgKRepJ8vRaXRX250qQ/fkPWrLZUtBOHmeqBQ39wu3p4jE7Y9MxrJQIYYlORHURgzTdCuYTQ9ny0m0WGQ0aDDFbG6TzxnwATyAWMkoueepysyh47RX1bMXga+k55u/9ctUnVSo= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: fee645a9-3329-4e67-aba7-08d4fc129978 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:KL1PR0601MB1335; x-ms-traffictypediagnostic: KL1PR0601MB1335: x-exchange-antispam-report-test: UriScan:(22074186197030)(183786458502308); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123555025)(20161123558100)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:KL1PR0601MB1335;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:KL1PR0601MB1335; x-forefront-prvs: 0431F981D8 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(39860400002)(189002)(199003)(81166006)(54356999)(50986999)(3846002)(106356001)(6436002)(189998001)(102836003)(6116002)(5250100002)(101416001)(74316002)(6506006)(105586002)(305945005)(966005)(3660700001)(14454004)(7736002)(478600001)(25786009)(8676002)(8936002)(76176999)(81156014)(345774005)(2900100001)(2906002)(229853002)(97736004)(33656002)(68736007)(3280700002)(7696004)(55016002)(316002)(9686003)(6306002)(4326008)(42882006)(53936002)(6246003)(86362001)(5660300001)(66066001)(107886003)(2950100002)(54906002)(99286003);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1PR0601MB1335;H:KL1PR0601MB2038.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2017 08:20:17.8953 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1335 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v8F8Kctx014091 Hi Arnd, Thank you for the patch. > Subject: [PATCH] [media] rcar_drif: fix potential uninitialized variable > use > > Older compilers like gcc-4.6 may run into a case that returns an > uninitialized variable from rcar_drif_enable_rx() if that function was > ever called with an empty cur_ch_mask: > > drivers/media/platform/rcar_drif.c:658:2: error: ‘ret’ may be used > uninitialized in this function [-Werror=uninitialized] > > Newer compilers don't have that problem as they optimize the 'ret' > variable away and just return zero in that case. > > This changes the function to return -EINVAL for this particular failure, > to make it consistent across all compiler versions. > In case gcc gets changed to report a warning for it in the future, it's > also a good idea to shut it up now. > > Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82203 > Signed-off-by: Arnd Bergmann Acked-by: Ramesh Shanmugasundaram Thanks, Ramesh