From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@linux.ie>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Yi Wang <wang.yi59@zte.com.cn>
Subject: Re: [PATCH 4/7] drm/omap: fix possible object reference leak
Date: Thu, 4 Apr 2019 22:42:32 +0200 [thread overview]
Message-ID: <b34cb17c-aa74-3b15-5469-f7a1ba417d36@web.de> (raw)
In-Reply-To: <1554307455-40361-5-git-send-email-wen.yang99@zte.com.cn>
> @@ -208,8 +208,10 @@ static int __init omapdss_boot_init(void)
>
> dss = of_find_matching_node(NULL, omapdss_of_match);
>
> - if (dss == NULL || !of_device_is_available(dss))
> + if (dss == NULL || !of_device_is_available(dss)) {
> + of_node_put(dss);
> return 0;
> + }
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c?id=61de49cb596710b918f7a80839f0b6de2017bc32#n203
Can it be nicer to add a jump target here?
+ if (!dss || !of_device_is_available(dss))
- return 0;
+ goto put_node;
>
> omapdss_walk_device(dss, true);
>
> @@ -234,6 +236,7 @@ static int __init omapdss_boot_init(void)
> kfree(n);
> }
>
+put_node:
> + of_node_put(dss);
> return 0;
> }
Regards,
Markus
next prev parent reply other threads:[~2019-04-04 20:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 16:04 [PATCH 0/7] fix possible object reference leaks in drivers/gpu Wen Yang
2019-04-03 16:04 ` [PATCH 1/7] drm/mediatek: fix possible object reference leak Wen Yang
2019-04-09 5:15 ` CK Hu
2019-04-03 16:04 ` [PATCH 2/7] drm/meson: " Wen Yang
2019-04-04 20:05 ` Markus Elfring
2019-04-03 16:04 ` [PATCH 3/7] drm/msm: a5xx: " Wen Yang
2019-04-10 16:21 ` Jordan Crouse
2019-04-03 16:04 ` [PATCH 4/7] drm/omap: " Wen Yang
2019-04-04 13:25 ` Laurent Pinchart
2019-04-04 20:42 ` Markus Elfring [this message]
2019-04-03 16:04 ` [PATCH 5/7] drm/pl111: " Wen Yang
2019-04-04 19:59 ` Eric Anholt
2019-04-04 21:05 ` Markus Elfring
2019-04-03 16:04 ` [PATCH 6/7] drm: rcar-du: " Wen Yang
2019-04-04 13:35 ` Laurent Pinchart
2019-04-03 16:04 ` [PATCH 7/7] drm/tegra: " Wen Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b34cb17c-aa74-3b15-5469-f7a1ba417d36@web.de \
--to=markus.elfring@web.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=tomi.valkeinen@ti.com \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).