mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
drm/mcde: Fix uninitialized variable
We need to handle the case when of_drm_find_bridge() returns NULL. Reported-by: Dan Carpenter <[email protected]> Acked-by: Dan Carpenter <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
@@ -317,7 +317,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;
|
||||
@@ -483,6 +483,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);
|
||||
|
||||
Reference in New Issue
Block a user