summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/sor.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-15 11:21:49 +1000
committerDave Airlie <airlied@redhat.com>2020-10-15 11:21:49 +1000
commitb24fdd4b3830f77ff71c09eaec6a617e88abe419 (patch)
tree123628b3c27646c5ae7dbbdf3ad7e4a041f75916 /drivers/gpu/drm/tegra/sor.c
parent029f56db6ac248769f2c260bfaf3c3c0e23e904c (diff)
parent640eee067d9aae0bb98d8706001976ff1affaf00 (diff)
Merge branch 'drm-next' of git://anongit.freedesktop.org/git/drm/drmdrm-next-5.10-merged
Conflict resolution temp branch
Diffstat (limited to 'drivers/gpu/drm/tegra/sor.c')
-rw-r--r--drivers/gpu/drm/tegra/sor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 45b5258c77a2..e88a17c2937f 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -3728,7 +3728,12 @@ static int tegra_sor_probe(struct platform_device *pdev)
if (!sor->aux)
return -EPROBE_DEFER;
- sor->output.ddc = &sor->aux->ddc;
+ if (get_device(&sor->aux->ddc.dev)) {
+ if (try_module_get(sor->aux->ddc.owner))
+ sor->output.ddc = &sor->aux->ddc;
+ else
+ put_device(&sor->aux->ddc.dev);
+ }
}
if (!sor->aux) {