提交 c353103d 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 b22fe37b
......@@ -90,24 +90,30 @@ 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);
int size = len * sizeof(u16);
if (cmap->len != len) {
fb_dealloc_cmap(cmap);
if (!len)
return 0;
if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
cmap->red = kmalloc(size, GFP_ATOMIC);
if (!cmap->red)
goto fail;
if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
cmap->green = kmalloc(size, GFP_ATOMIC);
if (!cmap->green)
goto fail;
if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
cmap->blue = kmalloc(size, GFP_ATOMIC);
if (!cmap->blue)
goto fail;
if (transp) {
if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
cmap->transp = kmalloc(size, GFP_ATOMIC);
if (!cmap->transp)
goto fail;
} else
} else {
cmap->transp = NULL;
}
}
cmap->start = 0;
cmap->len = len;
fb_copy_cmap(fb_default_cmap(len), cmap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册