Files
android_kernel_xiaomi_sm8450/drivers/gpu/drm
Christophe JAILLET dbeb4574dd drm/msm/dsi: Fix some reference counted resource leaks
[ Upstream commit 6977cc89c87506ff17e6c05f0e37f46752256e82 ]

'of_find_device_by_node()' takes a reference that must be released when
not needed anymore.
This is expected to be done in 'dsi_destroy()'.

However, there are 2 issues in 'dsi_get_phy()'.

First, if 'of_find_device_by_node()' succeeds but 'platform_get_drvdata()'
returns NULL, 'msm_dsi->phy_dev' will still be NULL, and the reference
won't be released in 'dsi_destroy()'.

Secondly, as 'of_find_device_by_node()' already takes a reference, there is
no need for an additional 'get_device()'.

Move the assignment to 'msm_dsi->phy_dev' a few lines above and remove the
unneeded 'get_device()' to solve both issues.

Fixes: ec31abf668 ("drm/msm/dsi: Separate PHY to another platform device")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f15bc57648a00e7c99f943903468a04639d50596.1628241097.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:38 +02:00
..
2021-07-19 09:44:58 +02:00
2020-08-11 11:58:31 +10:00
2021-09-03 10:09:26 +02:00
2021-09-15 09:50:35 +02:00
2020-04-03 17:11:41 +02:00
2020-09-08 14:41:40 +10:00
2021-05-14 09:50:22 +02:00
2020-09-11 10:47:19 +02:00
2021-05-11 14:47:26 +02:00
2020-05-27 14:31:42 +03:00
2020-04-03 17:11:41 +02:00
2020-09-21 10:45:08 +02:00
2020-09-21 10:45:08 +02:00
2020-05-29 12:58:11 +02:00
2020-09-21 10:45:08 +02:00
2020-08-11 11:58:31 +10:00
2021-01-27 11:54:55 +01:00
2021-03-30 14:31:51 +02:00