linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] [media] mb86a20s: always initialize a return value
@ 2016-09-10 16:49 Nicolas Iooss
  2016-10-23 17:09 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2016-09-10 16:49 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-media
  Cc: linux-kernel, Nicolas Iooss

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 <nicolas.iooss_linux@m4x.org>
---
 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;
 	}
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] [media] mb86a20s: always initialize a return value
  2016-09-10 16:49 [PATCH 1/1] [media] mb86a20s: always initialize a return value Nicolas Iooss
@ 2016-10-23 17:09 ` Nicolas Iooss
  2016-10-23 20:05   ` Andrey Utkin
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2016-10-23 17:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-media; +Cc: linux-kernel

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 <nicolas.iooss_linux@m4x.org>
> ---
>  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;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] [media] mb86a20s: always initialize a return value
  2016-10-23 17:09 ` Nicolas Iooss
@ 2016-10-23 20:05   ` Andrey Utkin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Utkin @ 2016-10-23 20:05 UTC (permalink / raw)
  To: Nicolas Iooss
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-media, linux-kernel

On Sun, Oct 23, 2016 at 07:09:10PM +0200, Nicolas Iooss wrote:
> 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?

No, it's extremely unlikely that bug fixing patches get silently
rejected by being ignored. Most probably the time of your submission is
unfortunate, being at the time when submissions are not merged.
I am in same situation with a couple of patches. I asked Mauro yesterday
on IRC and he replied:

I don't handle submissions during 3 weeks, during the merge window
one week before, and the two weeks after that
except when it is a bug that would affect the merge window
(end  of quote)

So unless you make it clear about which "release branches" are affected,
your submission is to be delayed - possibly up to 6 weeks or so.

I was suggested to add tags Fixes: buggy-commit-id and
Cc: stable@vger.kernel.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-23 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 16:49 [PATCH 1/1] [media] mb86a20s: always initialize a return value Nicolas Iooss
2016-10-23 17:09 ` Nicolas Iooss
2016-10-23 20:05   ` Andrey Utkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).