aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/aty/radeon_base.c6
-rw-r--r--drivers/video/fbcmap.c4
-rw-r--r--drivers/video/fbsysfs.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index c9f0c5a07e6e..9a6b5b39b88e 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1067,7 +1067,7 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green,
1067 1067
1068 1068
1069 if (regno > 255) 1069 if (regno > 255)
1070 return 1; 1070 return -EINVAL;
1071 1071
1072 red >>= 8; 1072 red >>= 8;
1073 green >>= 8; 1073 green >>= 8;
@@ -1086,9 +1086,9 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green,
1086 pindex = regno * 8; 1086 pindex = regno * 8;
1087 1087
1088 if (rinfo->depth == 16 && regno > 63) 1088 if (rinfo->depth == 16 && regno > 63)
1089 return 1; 1089 return -EINVAL;
1090 if (rinfo->depth == 15 && regno > 31) 1090 if (rinfo->depth == 15 && regno > 31)
1091 return 1; 1091 return -EINVAL;
1092 1092
1093 /* For 565, the green component is mixed one order 1093 /* For 565, the green component is mixed one order
1094 * below 1094 * below
diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
index c32a2a50bfa2..1f98392a43b3 100644
--- a/drivers/video/fbcmap.c
+++ b/drivers/video/fbcmap.c
@@ -85,7 +85,7 @@ static struct fb_cmap default_16_colors = {
85 * Allocates memory for a colormap @cmap. @len is the 85 * Allocates memory for a colormap @cmap. @len is the
86 * number of entries in the palette. 86 * number of entries in the palette.
87 * 87 *
88 * Returns -1 errno on error, or zero on success. 88 * Returns negative errno on error, or zero on success.
89 * 89 *
90 */ 90 */
91 91
@@ -116,7 +116,7 @@ int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
116 116
117fail: 117fail:
118 fb_dealloc_cmap(cmap); 118 fb_dealloc_cmap(cmap);
119 return -1; 119 return -ENOMEM;
120} 120}
121 121
122/** 122/**
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index 6d26057337e2..b72b05250a9d 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -348,7 +348,7 @@ static ssize_t store_cmap(struct class_device *class_device, const char *buf,
348 fb_copy_cmap(&umap, &fb_info->cmap); 348 fb_copy_cmap(&umap, &fb_info->cmap);
349 fb_dealloc_cmap(&umap); 349 fb_dealloc_cmap(&umap);
350 350
351 return rc; 351 return rc ?: count;
352 } 352 }
353 for (i = 0; i < length; i++) { 353 for (i = 0; i < length; i++) {
354 u16 red, blue, green, tsp; 354 u16 red, blue, green, tsp;
@@ -367,7 +367,7 @@ static ssize_t store_cmap(struct class_device *class_device, const char *buf,
367 if (transp) 367 if (transp)
368 fb_info->cmap.transp[i] = tsp; 368 fb_info->cmap.transp[i] = tsp;
369 } 369 }
370 return 0; 370 return count;
371} 371}
372 372
373static ssize_t show_cmap(struct class_device *class_device, char *buf) 373static ssize_t show_cmap(struct class_device *class_device, char *buf)