Commit c353103d authored by Dan Carpenter's avatar Dan Carpenter Committed by Paul Mundt

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent b22fe37b
...@@ -90,32 +90,38 @@ static const struct fb_cmap default_16_colors = { ...@@ -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 fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
{ {
int size = len*sizeof(u16); int size = len * sizeof(u16);
if (cmap->len != len) { if (cmap->len != len) {
fb_dealloc_cmap(cmap); fb_dealloc_cmap(cmap);
if (!len) if (!len)
return 0; return 0;
if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
goto fail; cmap->red = kmalloc(size, GFP_ATOMIC);
if (!(cmap->green = kmalloc(size, GFP_ATOMIC))) if (!cmap->red)
goto fail; goto fail;
if (!(cmap->blue = kmalloc(size, GFP_ATOMIC))) cmap->green = kmalloc(size, GFP_ATOMIC);
goto fail; if (!cmap->green)
if (transp) { goto fail;
if (!(cmap->transp = kmalloc(size, GFP_ATOMIC))) cmap->blue = kmalloc(size, GFP_ATOMIC);
goto fail; if (!cmap->blue)
} else goto fail;
cmap->transp = NULL; if (transp) {
} cmap->transp = kmalloc(size, GFP_ATOMIC);
cmap->start = 0; if (!cmap->transp)
cmap->len = len; goto fail;
fb_copy_cmap(fb_default_cmap(len), cmap); } else {
return 0; cmap->transp = NULL;
}
}
cmap->start = 0;
cmap->len = len;
fb_copy_cmap(fb_default_cmap(len), cmap);
return 0;
fail: fail:
fb_dealloc_cmap(cmap); fb_dealloc_cmap(cmap);
return -ENOMEM; return -ENOMEM;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment