From: Thierry Reding <treding@nvidia.com>
Date: Fri, 3 Jul 2015 12:14:29 +0000 (+0200)
Subject: drm/tegra: sor: Set minor after debugfs initialization
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ff1f22c882493dcceb25cbca5b516d8e4271151;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

drm/tegra: sor: Set minor after debugfs initialization

The DRM minor is needed to teardown debugfs, so it needs to be tracked
to prevent a crash on driver removal.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 7df7328f9fed..18b4d892bce2 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -841,6 +841,8 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor,
 		goto free;
 	}
 
+	sor->minor = minor;
+
 	return err;
 
 free: