All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: ov02a10: fix an uninitialized return
@ 2020-12-07 13:00 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2020-12-07 13:00 UTC (permalink / raw)
  To: Dongchun Zhu
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Andy Shevchenko,
	linux-media, kernel-janitors

The "ret" variable isn't set on the no-op path where we are setting to
on/off and it's in the on or off state already.

Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/media/i2c/ov02a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 391718136ade..cf40e207ea21 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -530,7 +530,7 @@ static int ov02a10_s_stream(struct v4l2_subdev *sd, int on)
 {
 	struct ov02a10 *ov02a10 = to_ov02a10(sd);
 	struct i2c_client *client = v4l2_get_subdevdata(&ov02a10->subdev);
-	int ret;
+	int ret = 0;
 
 	mutex_lock(&ov02a10->mutex);
 
-- 
2.29.2


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

* [PATCH] media: i2c: ov02a10: fix an uninitialized return
@ 2020-12-07 13:00 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2020-12-07 13:00 UTC (permalink / raw)
  To: Dongchun Zhu
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Andy Shevchenko,
	linux-media, kernel-janitors

The "ret" variable isn't set on the no-op path where we are setting to
on/off and it's in the on or off state already.

Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/media/i2c/ov02a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 391718136ade..cf40e207ea21 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -530,7 +530,7 @@ static int ov02a10_s_stream(struct v4l2_subdev *sd, int on)
 {
 	struct ov02a10 *ov02a10 = to_ov02a10(sd);
 	struct i2c_client *client = v4l2_get_subdevdata(&ov02a10->subdev);
-	int ret;
+	int ret = 0;
 
 	mutex_lock(&ov02a10->mutex);
 
-- 
2.29.2

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
  2020-12-07 13:00 ` Dan Carpenter
@ 2020-12-07 13:14   ` Sakari Ailus
  -1 siblings, 0 replies; 8+ messages in thread
From: Sakari Ailus @ 2020-12-07 13:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dongchun Zhu, Mauro Carvalho Chehab, Andy Shevchenko,
	linux-media, kernel-janitors

Hi Dan,

On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> The "ret" variable isn't set on the no-op path where we are setting to
> on/off and it's in the on or off state already.
> 
> Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for the patch.

This issue has been fixed by another patch here:

<URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>

-- 
Kind regards,

Sakari Ailus

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
@ 2020-12-07 13:14   ` Sakari Ailus
  0 siblings, 0 replies; 8+ messages in thread
From: Sakari Ailus @ 2020-12-07 13:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dongchun Zhu, Mauro Carvalho Chehab, Andy Shevchenko,
	linux-media, kernel-janitors

Hi Dan,

On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> The "ret" variable isn't set on the no-op path where we are setting to
> on/off and it's in the on or off state already.
> 
> Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks for the patch.

This issue has been fixed by another patch here:

<URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>

-- 
Kind regards,

Sakari Ailus

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
  2020-12-07 13:00 ` Dan Carpenter
  (?)
  (?)
@ 2020-12-07 15:56 ` Andy Shevchenko
  2020-12-07 16:01     ` Dmitry Vyukov
  -1 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-12-07 15:56 UTC (permalink / raw)
  To: kernel-janitors

+Cc: some people who involved in different kernel source checkers

On Mon, Dec 7, 2020 at 3:19 PM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
> On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> > The "ret" variable isn't set on the no-op path where we are setting to
> > on/off and it's in the on or off state already.
> >
> > Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Thanks for the patch.
>
> This issue has been fixed by another patch here:
>
> <URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>

This has been reported by 3 or 4 different people. I'm wondering if
it's possible to introduce a common database to somehow reduce the
amount of patches against the same findings.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
  2020-12-07 15:56 ` Andy Shevchenko
@ 2020-12-07 16:01     ` Dmitry Vyukov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Vyukov @ 2020-12-07 16:01 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Arnd Bergmann, kbuild test robot, Dan Carpenter, Dongchun Zhu,
	Mauro Carvalho Chehab, Andy Shevchenko, kernel-janitors,
	workflows, kernelci

On Mon, Dec 7, 2020 at 4:55 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> +Cc: some people who involved in different kernel source checkers
>
> On Mon, Dec 7, 2020 at 3:19 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> > On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> > > The "ret" variable isn't set on the no-op path where we are setting to
> > > on/off and it's in the on or off state already.
> > >
> > > Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > Thanks for the patch.
> >
> > This issue has been fixed by another patch here:
> >
> > <URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>
>
> This has been reported by 3 or 4 different people. I'm wondering if
> it's possible to introduce a common database to somehow reduce the
> amount of patches against the same findings.

+workflows and kernelci re multiple reports/patches for the same kernel bug

I think KernelCI DB effort has a goal of fighting this duplication of
efforts. But as far as I understand the exact mechanism for
deduplication is an open question.

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
@ 2020-12-07 16:01     ` Dmitry Vyukov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Vyukov @ 2020-12-07 16:01 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Arnd Bergmann, kbuild test robot, Dan Carpenter, Dongchun Zhu,
	Mauro Carvalho Chehab, Andy Shevchenko, kernel-janitors,
	workflows, kernelci

On Mon, Dec 7, 2020 at 4:55 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> +Cc: some people who involved in different kernel source checkers
>
> On Mon, Dec 7, 2020 at 3:19 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> > On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> > > The "ret" variable isn't set on the no-op path where we are setting to
> > > on/off and it's in the on or off state already.
> > >
> > > Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > Thanks for the patch.
> >
> > This issue has been fixed by another patch here:
> >
> > <URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>
>
> This has been reported by 3 or 4 different people. I'm wondering if
> it's possible to introduce a common database to somehow reduce the
> amount of patches against the same findings.

+workflows and kernelci re multiple reports/patches for the same kernel bug

I think KernelCI DB effort has a goal of fighting this duplication of
efforts. But as far as I understand the exact mechanism for
deduplication is an open question.

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

* Re: [PATCH] media: i2c: ov02a10: fix an uninitialized return
  2020-12-07 13:00 ` Dan Carpenter
                   ` (2 preceding siblings ...)
  (?)
@ 2020-12-07 18:34 ` Dan Carpenter
  -1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2020-12-07 18:34 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Dec 07, 2020 at 05:56:15PM +0200, Andy Shevchenko wrote:
> +Cc: some people who involved in different kernel source checkers
> 
> On Mon, Dec 7, 2020 at 3:19 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> > On Mon, Dec 07, 2020 at 04:00:29PM +0300, Dan Carpenter wrote:
> > > The "ret" variable isn't set on the no-op path where we are setting to
> > > on/off and it's in the on or off state already.
> > >
> > > Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > Thanks for the patch.
> >
> > This issue has been fixed by another patch here:
> >
> > <URL:https://patchwork.linuxtv.org/project/linux-media/patch/20201204082037.1658297-1-arnd@kernel.org/>
> 
> This has been reported by 3 or 4 different people. I'm wondering if
> it's possible to introduce a common database to somehow reduce the
> amount of patches against the same findings.

Tell your devs to stop introducing bugs...  :P  This is your punishment.

Linus turned off GCC warnings for uninitialized variables earlier this
year.  He got annoyed because it doesn't work half the time depending on
the version and optimization level.  I sort of disagree with that,
because I reporting these bugs is taking up a lot of my time.  It has
definitely gotten worse from my perspective.

The best solution would be for the original developer to run Smatch on
their code.  Another option would be to make a script where you give it
a function name and it searches patches within the last week on
lore.kernel.org

regards,
dan carpenter

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

end of thread, other threads:[~2020-12-07 18:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 13:00 [PATCH] media: i2c: ov02a10: fix an uninitialized return Dan Carpenter
2020-12-07 13:00 ` Dan Carpenter
2020-12-07 13:14 ` Sakari Ailus
2020-12-07 13:14   ` Sakari Ailus
2020-12-07 15:56 ` Andy Shevchenko
2020-12-07 16:01   ` Dmitry Vyukov
2020-12-07 16:01     ` Dmitry Vyukov
2020-12-07 18:34 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.