From 99066142f52ef7d630da2204e04ca4d84d06e2d2 Mon Sep 17 00:00:00 2001 From: Alan Curry Date: Mon, 27 Mar 2006 01:17:30 -0800 Subject: [PATCH] --- yaml --- r: 24372 b: refs/heads/master c: db77ec270d00098ff4fbf15f62f4506f6efb25d2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/aty/radeon_base.c | 6 +++--- trunk/drivers/video/fbcmap.c | 4 ++-- trunk/drivers/video/fbsysfs.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 1adf52b72f66..c83efdca79b6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 59153f7d7effdb5b3c81eb6d03914a866157b319 +refs/heads/master: db77ec270d00098ff4fbf15f62f4506f6efb25d2 diff --git a/trunk/drivers/video/aty/radeon_base.c b/trunk/drivers/video/aty/radeon_base.c index c9f0c5a07e6e..9a6b5b39b88e 100644 --- a/trunk/drivers/video/aty/radeon_base.c +++ b/trunk/drivers/video/aty/radeon_base.c @@ -1067,7 +1067,7 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green, if (regno > 255) - return 1; + return -EINVAL; red >>= 8; green >>= 8; @@ -1086,9 +1086,9 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green, pindex = regno * 8; if (rinfo->depth == 16 && regno > 63) - return 1; + return -EINVAL; if (rinfo->depth == 15 && regno > 31) - return 1; + return -EINVAL; /* For 565, the green component is mixed one order * below diff --git a/trunk/drivers/video/fbcmap.c b/trunk/drivers/video/fbcmap.c index c32a2a50bfa2..1f98392a43b3 100644 --- a/trunk/drivers/video/fbcmap.c +++ b/trunk/drivers/video/fbcmap.c @@ -85,7 +85,7 @@ static struct fb_cmap default_16_colors = { * Allocates memory for a colormap @cmap. @len is the * number of entries in the palette. * - * Returns -1 errno on error, or zero on success. + * Returns negative errno on error, or zero on success. * */ @@ -116,7 +116,7 @@ int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp) fail: fb_dealloc_cmap(cmap); - return -1; + return -ENOMEM; } /** diff --git a/trunk/drivers/video/fbsysfs.c b/trunk/drivers/video/fbsysfs.c index 6d26057337e2..b72b05250a9d 100644 --- a/trunk/drivers/video/fbsysfs.c +++ b/trunk/drivers/video/fbsysfs.c @@ -348,7 +348,7 @@ static ssize_t store_cmap(struct class_device *class_device, const char *buf, fb_copy_cmap(&umap, &fb_info->cmap); fb_dealloc_cmap(&umap); - return rc; + return rc ?: count; } for (i = 0; i < length; i++) { u16 red, blue, green, tsp; @@ -367,7 +367,7 @@ static ssize_t store_cmap(struct class_device *class_device, const char *buf, if (transp) fb_info->cmap.transp[i] = tsp; } - return 0; + return count; } static ssize_t show_cmap(struct class_device *class_device, char *buf)