diff options
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r-- | drivers/gpu/drm/tegra/drm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h index fdfe259ed7f8..7da0b923131f 100644 --- a/drivers/gpu/drm/tegra/drm.h +++ b/drivers/gpu/drm/tegra/drm.h | |||
@@ -116,7 +116,7 @@ host1x_client_to_dc(struct host1x_client *client) | |||
116 | 116 | ||
117 | static inline struct tegra_dc *to_tegra_dc(struct drm_crtc *crtc) | 117 | static inline struct tegra_dc *to_tegra_dc(struct drm_crtc *crtc) |
118 | { | 118 | { |
119 | return container_of(crtc, struct tegra_dc, base); | 119 | return crtc ? container_of(crtc, struct tegra_dc, base) : NULL; |
120 | } | 120 | } |
121 | 121 | ||
122 | static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long value, | 122 | static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long value, |