2022-06-14 12:11:52

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] drm: logicvc: Fix uninitialized variable in probe

The "regmap" is supposed to be initialized to NULL but it's used
without being initialized.

Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
Signed-off-by: Dan Carpenter <[email protected]>
---
drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/logicvc/logicvc_drm.c b/drivers/gpu/drm/logicvc/logicvc_drm.c
index df1805cf0f95..0b983a33f9ff 100644
--- a/drivers/gpu/drm/logicvc/logicvc_drm.c
+++ b/drivers/gpu/drm/logicvc/logicvc_drm.c
@@ -298,7 +298,7 @@ static int logicvc_drm_probe(struct platform_device *pdev)
struct logicvc_drm *logicvc;
struct device *dev = &pdev->dev;
struct drm_device *drm_dev;
- struct regmap *regmap;
+ struct regmap *regmap = NULL;
struct resource res;
void __iomem *base;
int irq;
--
2.35.1


2022-06-24 14:46:02

by Paul Kocialkowski

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

Hi Dan,

On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> The "regmap" is supposed to be initialized to NULL but it's used
> without being initialized.
>
> Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> Signed-off-by: Dan Carpenter <[email protected]>

Nice catch, thanks a lot!

Acked-by: Paul Kocialkowski <[email protected]>

Cheers,

Paul

> ---
> drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/logicvc/logicvc_drm.c b/drivers/gpu/drm/logicvc/logicvc_drm.c
> index df1805cf0f95..0b983a33f9ff 100644
> --- a/drivers/gpu/drm/logicvc/logicvc_drm.c
> +++ b/drivers/gpu/drm/logicvc/logicvc_drm.c
> @@ -298,7 +298,7 @@ static int logicvc_drm_probe(struct platform_device *pdev)
> struct logicvc_drm *logicvc;
> struct device *dev = &pdev->dev;
> struct drm_device *drm_dev;
> - struct regmap *regmap;
> + struct regmap *regmap = NULL;
> struct resource res;
> void __iomem *base;
> int irq;
> --
> 2.35.1
>

--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


Attachments:
(No filename) (1.16 kB)
signature.asc (499.00 B)
Download all attachments

2022-06-24 15:12:57

by Paul Kocialkowski

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

Hi,

On Fri 24 Jun 22, 16:37, Maxime Ripard wrote:
> Hi,
>
> On Fri, Jun 24, 2022 at 04:35:25PM +0200, Paul Kocialkowski wrote:
> > On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> > > The "regmap" is supposed to be initialized to NULL but it's used
> > > without being initialized.
> > >
> > > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > > Signed-off-by: Dan Carpenter <[email protected]>
> >
> > Nice catch, thanks a lot!
> >
> > Acked-by: Paul Kocialkowski <[email protected]>
>
> Since you have the commit rights to drm-misc, you should apply it

Absolutely, I'm on my way to doing that.

Do I need to reply to the emails with a message indicating that I merged them
or is using the tool sufficient?

Thanks,

Paul

--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


Attachments:
(No filename) (900.00 B)
signature.asc (499.00 B)
Download all attachments

2022-06-24 15:16:25

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

Hi,

On Fri, Jun 24, 2022 at 04:35:25PM +0200, Paul Kocialkowski wrote:
> On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> > The "regmap" is supposed to be initialized to NULL but it's used
> > without being initialized.
> >
> > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > Signed-off-by: Dan Carpenter <[email protected]>
>
> Nice catch, thanks a lot!
>
> Acked-by: Paul Kocialkowski <[email protected]>

Since you have the commit rights to drm-misc, you should apply it

Maxime

2022-06-24 15:34:28

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

On Fri, Jun 24, 2022 at 04:46:36PM +0200, Paul Kocialkowski wrote:
> Hi,
>
> On Fri 24 Jun 22, 16:37, Maxime Ripard wrote:
> > Hi,
> >
> > On Fri, Jun 24, 2022 at 04:35:25PM +0200, Paul Kocialkowski wrote:
> > > On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> > > > The "regmap" is supposed to be initialized to NULL but it's used
> > > > without being initialized.
> > > >
> > > > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > > > Signed-off-by: Dan Carpenter <[email protected]>
> > >
> > > Nice catch, thanks a lot!
> > >
> > > Acked-by: Paul Kocialkowski <[email protected]>
> >
> > Since you have the commit rights to drm-misc, you should apply it
>
> Absolutely, I'm on my way to doing that.

Giving your Acked-by is confusing then, because it's kind of implied if
you apply it.

> Do I need to reply to the emails with a message indicating that I
> merged them or is using the tool sufficient?

Sending an email is better, dim doesn't do that

Maxime

2022-06-24 15:38:33

by Paul Kocialkowski

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

Hi,

On Fri 24 Jun 22, 16:35, Paul Kocialkowski wrote:
> Hi Dan,
>
> On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> > The "regmap" is supposed to be initialized to NULL but it's used
> > without being initialized.
> >
> > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > Signed-off-by: Dan Carpenter <[email protected]>
>
> Nice catch, thanks a lot!
>
> Acked-by: Paul Kocialkowski <[email protected]>

Pushed to drm-misc-next, thanks!

Paul

> Cheers,
>
> Paul
>
> > ---
> > drivers/gpu/drm/logicvc/logicvc_drm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/logicvc/logicvc_drm.c b/drivers/gpu/drm/logicvc/logicvc_drm.c
> > index df1805cf0f95..0b983a33f9ff 100644
> > --- a/drivers/gpu/drm/logicvc/logicvc_drm.c
> > +++ b/drivers/gpu/drm/logicvc/logicvc_drm.c
> > @@ -298,7 +298,7 @@ static int logicvc_drm_probe(struct platform_device *pdev)
> > struct logicvc_drm *logicvc;
> > struct device *dev = &pdev->dev;
> > struct drm_device *drm_dev;
> > - struct regmap *regmap;
> > + struct regmap *regmap = NULL;
> > struct resource res;
> > void __iomem *base;
> > int irq;
> > --
> > 2.35.1
> >
>
> --
> Paul Kocialkowski, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com



--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


Attachments:
(No filename) (1.43 kB)
signature.asc (499.00 B)
Download all attachments

2022-06-27 09:17:44

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] drm: logicvc: Fix uninitialized variable in probe

On Fri, Jun 24, 2022 at 04:46:36PM +0200, Paul Kocialkowski wrote:
> Hi,
>
> On Fri 24 Jun 22, 16:37, Maxime Ripard wrote:
> > Hi,
> >
> > On Fri, Jun 24, 2022 at 04:35:25PM +0200, Paul Kocialkowski wrote:
> > > On Tue 14 Jun 22, 15:08, Dan Carpenter wrote:
> > > > The "regmap" is supposed to be initialized to NULL but it's used
> > > > without being initialized.
> > > >
> > > > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > > > Signed-off-by: Dan Carpenter <[email protected]>
> > >
> > > Nice catch, thanks a lot!
> > >
> > > Acked-by: Paul Kocialkowski <[email protected]>
> >
> > Since you have the commit rights to drm-misc, you should apply it
>
> Absolutely, I'm on my way to doing that.
>
> Do I need to reply to the emails with a message indicating that I merged them
> or is using the tool sufficient?

Going back on this, but it's fairly easy with b4 to generate the
messages that you applied them.

For example, I'm using:

cat mail | b4 am -t --no-cover -o - -P _ | dim apply-branch drm-misc-fixes

b4 am will retrieve the last version of the patch from lore (and only
the current patch with --no-cover -P _), add the tags (-t) and output it
on stdout (-o -) and pass it to dim apply-branch

Then, you can do

b4 ty -a && git send-email *.thanks && rm *.thanks

And it will send a mail for every patch you applied in the current branch

Maxime