diff options
author | Dan Carpenter <error27@gmail.com> | 2010-11-13 13:06:38 +0300 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-17 14:55:43 +0900 |
commit | c353103de8795358af1584088aa471571decb307 (patch) | |
tree | 5f83429d2d42d173d46ec7a8cef09f820b58790e /drivers/video/fbcmap.c | |
parent | b22fe37b9907bf9cd61665ed4b865bc1d5cf71e8 (diff) | |
download | linux-c353103de8795358af1584088aa471571decb307.tar.gz linux-c353103de8795358af1584088aa471571decb307.tar.bz2 linux-c353103de8795358af1584088aa471571decb307.zip |
fbcmap: cleanup white space in fb_alloc_cmap()
checkpatch.pl and Andrew Morton both complained about the indenting in
fb_alloc_cmap()
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/fbcmap.c')
-rw-r--r-- | drivers/video/fbcmap.c | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c index f53b9f1d6aba..a79b9762901e 100644 --- a/drivers/video/fbcmap.c +++ b/drivers/video/fbcmap.c @@ -90,32 +90,38 @@ static const struct fb_cmap default_16_colors = { int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp) { - int size = len*sizeof(u16); - - if (cmap->len != len) { - fb_dealloc_cmap(cmap); - if (!len) - return 0; - if (!(cmap->red = kmalloc(size, GFP_ATOMIC))) - goto fail; - if (!(cmap->green = kmalloc(size, GFP_ATOMIC))) - goto fail; - if (!(cmap->blue = kmalloc(size, GFP_ATOMIC))) - goto fail; - if (transp) { - if (!(cmap->transp = kmalloc(size, GFP_ATOMIC))) - goto fail; - } else - cmap->transp = NULL; - } - cmap->start = 0; - cmap->len = len; - fb_copy_cmap(fb_default_cmap(len), cmap); - return 0; + int size = len * sizeof(u16); + + if (cmap->len != len) { + fb_dealloc_cmap(cmap); + if (!len) + return 0; + + cmap->red = kmalloc(size, GFP_ATOMIC); + if (!cmap->red) + goto fail; + cmap->green = kmalloc(size, GFP_ATOMIC); + if (!cmap->green) + goto fail; + cmap->blue = kmalloc(size, GFP_ATOMIC); + if (!cmap->blue) + goto fail; + if (transp) { + cmap->transp = kmalloc(size, GFP_ATOMIC); + if (!cmap->transp) + goto fail; + } else { + cmap->transp = NULL; + } + } + cmap->start = 0; + cmap->len = len; + fb_copy_cmap(fb_default_cmap(len), cmap); + return 0; fail: - fb_dealloc_cmap(cmap); - return -ENOMEM; + fb_dealloc_cmap(cmap); + return -ENOMEM; } /** |