Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756669AbcJWRJP (ORCPT ); Sun, 23 Oct 2016 13:09:15 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34677 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754925AbcJWRJN (ORCPT ); Sun, 23 Oct 2016 13:09:13 -0400 Subject: Re: [PATCH 1/1] [media] mb86a20s: always initialize a return value To: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-media@vger.kernel.org References: <20160910164901.2901-1-nicolas.iooss_linux@m4x.org> Cc: linux-kernel@vger.kernel.org From: Nicolas Iooss Message-ID: <93d6d621-88eb-a573-40a8-94571f95b327@m4x.org> Date: Sun, 23 Oct 2016 19:09:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20160910164901.2901-1-nicolas.iooss_linux@m4x.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 37 Hello, I sent the following patch (available on https://patchwork.kernel.org/patch/9325035/) a few weeks ago and got no feedback even though the bug it fixes seems to still exist in linux-next. Did I do something wrong? Should I consider this patch to be rejected? Thanks, Nicolas On 10/09/16 18:49, Nicolas Iooss wrote: > In mb86a20s_read_status_and_stats(), when mb86a20s_read_status() fails, > the function returns the value in variable rc without initializing it > first. Fix this by propagating the error code from variable status_nr. > > This bug has been found using clang and -Wsometimes-uninitialized > warning flag. > > Signed-off-by: Nicolas Iooss > --- > drivers/media/dvb-frontends/mb86a20s.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c > index 41325328a22e..eca07432645e 100644 > --- a/drivers/media/dvb-frontends/mb86a20s.c > +++ b/drivers/media/dvb-frontends/mb86a20s.c > @@ -1971,6 +1971,7 @@ static int mb86a20s_read_status_and_stats(struct dvb_frontend *fe, > if (status_nr < 0) { > dev_err(&state->i2c->dev, > "%s: Can't read frontend lock status\n", __func__); > + rc = status_nr; > goto error; > } > >