[media] V4L: omap1-camera: fix Oops with NULL platform data
[cascardo/linux.git] / drivers / video / neofb.c
index bfb802d..feea7b1 100644 (file)
@@ -1185,8 +1185,8 @@ static int neofb_pan_display(struct fb_var_screeninfo *var,
 
        DBG("neofb_update_start");
 
-       Base = (var->yoffset * var->xres_virtual + var->xoffset) >> 2;
-       Base *= (var->bits_per_pixel + 7) / 8;
+       Base = (var->yoffset * info->var.xres_virtual + var->xoffset) >> 2;
+       Base *= (info->var.bits_per_pixel + 7) / 8;
 
        neoUnlock();
 
@@ -1453,7 +1453,8 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
                         * is less than 16 bits wide. This is due to insufficient
                         * padding when writing the image. We need to adjust
                         * struct fb_pixmap. Not yet done. */
-                       return cfb_imageblit(info, image);
+                       cfb_imageblit(info, image);
+                       return;
                }
                bltCntl_flags = NEO_BC0_SRC_MONO;
        } else if (image->depth == info->var.bits_per_pixel) {
@@ -1461,7 +1462,8 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
        } else {
                /* We don't currently support hardware acceleration if image
                 * depth is different from display */
-               return cfb_imageblit(info, image);
+               cfb_imageblit(info, image);
+               return;
        }
 
        switch (info->var.bits_per_pixel) {