lkml.org 
[lkml]   [2019]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/7] drm/pl111: fix possible object reference leak
From
Date
> @@ -337,17 +338,20 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv)
> pdev = of_find_device_by_node(np);
> if (!pdev) {
> dev_err(dev, "can't find the sysreg device, deferring\n");
> + of_node_put(np);
> return -EPROBE_DEFER;
> }
> map = dev_get_drvdata(&pdev->dev);
> if (!map) {
> dev_err(dev, "sysreg has not yet probed\n");
> platform_device_put(pdev);
> + of_node_put(np);
> return -EPROBE_DEFER;
> }

How do you think about to move duplicate statements to an additional
jump target for the desired exception handling?

Regards,
Markus

\
 
 \ /
  Last update: 2019-04-04 23:05    [W:0.109 / U:1.744 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site