* [PATCH 6/15] sm501fb: check fb_alloc_cmap return value and handle failure properly
@ 2009-02-07 17:14 Andres Salomon
2009-02-09 16:57 ` [Linux-fbdev-devel] " Krzysztof Helt
0 siblings, 1 reply; 2+ messages in thread
From: Andres Salomon @ 2009-02-07 17:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-fbdev-devel, adaplas
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
drivers/video/sm501fb.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index dcd9879..eb5d73a 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1525,7 +1525,10 @@ static int sm501fb_init_fb(struct fb_info *fb,
}
/* initialise and set the palette */
- fb_alloc_cmap(&fb->cmap, NR_PALETTE, 0);
+ if (fb_alloc_cmap(&fb->cmap, NR_PALETTE, 0)) {
+ dev_err(info->dev, "failed to allocate cmap memory\n");
+ return -ENOMEM;
+ }
fb_set_cmap(&fb->cmap, fb);
ret = (fb->fbops->fb_check_var)(&fb->var, fb);
--
1.5.6.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Linux-fbdev-devel] [PATCH 6/15] sm501fb: check fb_alloc_cmap return value and handle failure properly
2009-02-07 17:14 [PATCH 6/15] sm501fb: check fb_alloc_cmap return value and handle failure properly Andres Salomon
@ 2009-02-09 16:57 ` Krzysztof Helt
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Helt @ 2009-02-09 16:57 UTC (permalink / raw)
To: Andres Salomon; +Cc: Andrew Morton, linux-fbdev-devel, linux-kernel, adaplas
On Sat, 7 Feb 2009 12:14:48 -0500
Andres Salomon <dilinger@queued.net> wrote:
>
> Signed-off-by: Andres Salomon <dilinger@debian.org>
> ---
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
> drivers/video/sm501fb.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
> index dcd9879..eb5d73a 100644
> --- a/drivers/video/sm501fb.c
> +++ b/drivers/video/sm501fb.c
> @@ -1525,7 +1525,10 @@ static int sm501fb_init_fb(struct fb_info *fb,
> }
>
> /* initialise and set the palette */
> - fb_alloc_cmap(&fb->cmap, NR_PALETTE, 0);
> + if (fb_alloc_cmap(&fb->cmap, NR_PALETTE, 0)) {
> + dev_err(info->dev, "failed to allocate cmap memory\n");
> + return -ENOMEM;
> + }
> fb_set_cmap(&fb->cmap, fb);
>
> ret = (fb->fbops->fb_check_var)(&fb->var, fb);
> --
> 1.5.6.5
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-09 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-07 17:14 [PATCH 6/15] sm501fb: check fb_alloc_cmap return value and handle failure properly Andres Salomon
2009-02-09 16:57 ` [Linux-fbdev-devel] " Krzysztof Helt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome