OSDN Git Service

Merge tag 'bcm-for-3.14-dt' of git://github.com/broadcom/bcm11351 into next/dt
[uclinux-h8/linux.git] / drivers / gpu / drm / tegra / drm.h
index f717c18..266aae0 100644 (file)
@@ -119,7 +119,7 @@ host1x_client_to_dc(struct host1x_client *client)
 
 static inline struct tegra_dc *to_tegra_dc(struct drm_crtc *crtc)
 {
-       return container_of(crtc, struct tegra_dc, base);
+       return crtc ? container_of(crtc, struct tegra_dc, base) : NULL;
 }
 
 static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long value,