From b190510d5a25ee8f1a2533bd128e0e2161f63aed Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Thu, 23 May 2013 10:05:17 +0300 Subject: video: tegra: host: Fix suspend in scale3d The new devfreq allows having an active devfreq without having an active governor. The old code assumed that having an active devfreq equals having an active governor - which lead to usage of bad NULL pointers. This patch adds necessary checks. Bug 1296920 Change-Id: I77cd7cd43c7c4e0141e60beedeb83effd7d89640 Signed-off-by: Arto Merilainen Reviewed-on: http://git-master/r/232002 Reviewed-by: Terje Bergstrom --- drivers/video/tegra/host/gr3d/pod_scaling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/tegra/host/gr3d/pod_scaling.c b/drivers/video/tegra/host/gr3d/pod_scaling.c index 3d740df6ec4b..5602ca94bfec 100644 --- a/drivers/video/tegra/host/gr3d/pod_scaling.c +++ b/drivers/video/tegra/host/gr3d/pod_scaling.c @@ -219,7 +219,7 @@ void nvhost_scale3d_suspend(struct platform_device *dev) mutex_lock(&df->lock); podgov = df->data; - if (!podgov->enable) { + if (!(podgov && podgov->enable)) { mutex_unlock(&df->lock); return; } -- cgit v1.2.3