Loading drivers/video/fbdev/core/fbcmap.c +4 −4 Original line number Diff line number Diff line Loading @@ -187,8 +187,8 @@ int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to) int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) { int tooff = 0, fromoff = 0; int size; u32 tooff = 0, fromoff = 0; u32 size; if (to->start > from->start) fromoff = to->start - from->start; Loading @@ -198,10 +198,10 @@ int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) return -EINVAL; size = to->len - tooff; if (size > (int) (from->len - fromoff)) if (size > (from->len - fromoff)) size = from->len - fromoff; size *= sizeof(u16); if (!size) if (size == 0) return -EINVAL; if (copy_to_user(to->red+tooff, from->red+fromoff, size)) Loading Loading
drivers/video/fbdev/core/fbcmap.c +4 −4 Original line number Diff line number Diff line Loading @@ -187,8 +187,8 @@ int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to) int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) { int tooff = 0, fromoff = 0; int size; u32 tooff = 0, fromoff = 0; u32 size; if (to->start > from->start) fromoff = to->start - from->start; Loading @@ -198,10 +198,10 @@ int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) return -EINVAL; size = to->len - tooff; if (size > (int) (from->len - fromoff)) if (size > (from->len - fromoff)) size = from->len - fromoff; size *= sizeof(u16); if (!size) if (size == 0) return -EINVAL; if (copy_to_user(to->red+tooff, from->red+fromoff, size)) Loading