]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
tegra: dc: ext: fix null dereference
authorDaniel Solomon <daniels@nvidia.com>
Fri, 24 Jul 2015 03:27:04 +0000 (20:27 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Mon, 27 Jul 2015 21:58:32 +0000 (14:58 -0700)
Bug 200124751

Change-Id: Ia31c61820f9b5d013571c04c9d80db8e9179335e
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/774214
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/video/tegra/dc/ext/dev.c

index e899f0dc21e5ecae0d83fa90b10801843b69be78..457537c5d1b21349127de1da0ccdc8bf46658488 100644 (file)
@@ -421,6 +421,7 @@ static int tegra_dc_ext_set_windowattr(struct tegra_dc_ext *ext,
        int err = 0;
        struct tegra_dc_ext_win *ext_win = &ext->win[win->idx];
        s64 timestamp_ns;
+       struct tegra_vrr *vrr = ext->dc->out->vrr;
 
        if (flip_win->handle[TEGRA_DC_Y] == NULL) {
                win->flags = 0;
@@ -505,7 +506,7 @@ static int tegra_dc_ext_set_windowattr(struct tegra_dc_ext *ext,
                if (timestamp_ns) {
                        /* XXX: Should timestamping be overridden by "no_vsync"
                         * flag */
-                       if (ext->dc->out->vrr->enable) {
+                       if (vrr && vrr->enable) {
                                struct timespec tm;
                                s64 now_ns = 0;
                                s32 sleep_us = 0;