Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] drm/mcde: Fix uninitialized variable
@ 2019-06-18 11:52 Linus Walleij
  2019-06-18 12:30 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2019-06-18 11:52 UTC (permalink / raw)
  To: dri-devel, Maarten Lankhorst, Maxime Ripard, Sean Paul
  Cc: Linus Walleij, Dan Carpenter, linux-arm-kernel

We need to handle the case when of_drm_find_bridge() returns
NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Account for both NULL and error pointers by two clauses.
---
 drivers/gpu/drm/mcde/mcde_drv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index baf63fb6850a..a810568c76df 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -319,7 +319,7 @@ static int mcde_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct drm_device *drm;
 	struct mcde *mcde;
-	struct component_match *match;
+	struct component_match *match = NULL;
 	struct resource *res;
 	u32 pid;
 	u32 val;
@@ -485,6 +485,10 @@ static int mcde_probe(struct platform_device *pdev)
 		}
 		put_device(p);
 	}
+	if (!match) {
+		dev_err(dev, "no matching components\n");
+		return -ENODEV;
+	}
 	if (IS_ERR(match)) {
 		dev_err(dev, "could not create component match\n");
 		ret = PTR_ERR(match);
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] drm/mcde: Fix uninitialized variable
  2019-06-18 11:52 [PATCH v2] drm/mcde: Fix uninitialized variable Linus Walleij
@ 2019-06-18 12:30 ` Dan Carpenter
  2019-06-24 22:09   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2019-06-18 12:30 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Maxime Ripard, Sean Paul, Maarten Lankhorst, linux-arm-kernel, dri-devel

Thanks!

regards,
dan carpenter


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] drm/mcde: Fix uninitialized variable
  2019-06-18 12:30 ` Dan Carpenter
@ 2019-06-24 22:09   ` Linus Walleij
  2019-06-25  7:13     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2019-06-24 22:09 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Maxime Ripard, Sean Paul, Maarten Lankhorst, Linux ARM,
	open list:DRM PANEL DRIVERS

On Tue, Jun 18, 2019 at 2:31 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:

> Thanks!

Recording this as Acked-by: when applying.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] drm/mcde: Fix uninitialized variable
  2019-06-24 22:09   ` Linus Walleij
@ 2019-06-25  7:13     ` Dan Carpenter
  2019-06-25  8:24       ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2019-06-25  7:13 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Maxime Ripard, Sean Paul, Maarten Lankhorst, Linux ARM,
	open list:DRM PANEL DRIVERS

On Tue, Jun 25, 2019 at 12:09:54AM +0200, Linus Walleij wrote:
> On Tue, Jun 18, 2019 at 2:31 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> > Thanks!
> 
> Recording this as Acked-by: when applying.
> 

That's is an honour for me.  I figured that your Signed-off-by dwarfed
my Ack.  :P

regards,
dan carpenter


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] drm/mcde: Fix uninitialized variable
  2019-06-25  7:13     ` Dan Carpenter
@ 2019-06-25  8:24       ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2019-06-25  8:24 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Maxime Ripard, Sean Paul, Maarten Lankhorst, Linux ARM,
	open list:DRM PANEL DRIVERS

On Tue, Jun 25, 2019 at 9:14 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Tue, Jun 25, 2019 at 12:09:54AM +0200, Linus Walleij wrote:
> > On Tue, Jun 18, 2019 at 2:31 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > > Thanks!
> >
> > Recording this as Acked-by: when applying.
> >
>
> That's is an honour for me.  I figured that your Signed-off-by dwarfed
> my Ack.  :P

Not at all. In DRM we have a rule to not push any changes without
a proper ACK.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 11:52 [PATCH v2] drm/mcde: Fix uninitialized variable Linus Walleij
2019-06-18 12:30 ` Dan Carpenter
2019-06-24 22:09   ` Linus Walleij
2019-06-25  7:13     ` Dan Carpenter
2019-06-25  8:24       ` Linus Walleij

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox