summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 70b82bde9e43..b687382d1dd4 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -399,6 +399,9 @@ static int tegra_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long
}
int tegra_fb_get_mode(struct tegra_dc *dc) {
+ /* Avoid error when reading sysfs */
+ if (dc->fb->info->mode == NULL)
+ return 0;
return dc->fb->info->mode->refresh;
}