]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
drm/sun4i: Fix releasing node when enumerating enpoints
authorJernej Skrabec <jernej.skrabec@siol.net>
Mon, 25 Jun 2018 12:02:46 +0000 (14:02 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Wed, 27 Jun 2018 19:43:49 +0000 (21:43 +0200)
commit367c359aa8637b15ee8df6335c5a29b7623966ec
treeebed159e710dd8f90e01b5b3c078c57c5dbbbbdd
parent19f3ebed3f3612f97ee28af26d53656f5776f89a
drm/sun4i: Fix releasing node when enumerating enpoints

sun4i_drv_add_endpoints() has a memory leak since it uses of_node_put()
when remote is equal to NULL and does nothing when remote has a valid
pointer.

Invert the logic to fix memory leak.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180625120304.7543-7-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun4i_drv.c