projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed3f909
)
OMAP: DSS2: OMAPFB: Add null pointer check
author
Samreen
<samreen@ti.com>
Tue, 16 Nov 2010 11:49:07 +0000
(12:49 +0100)
committer
Tomi Valkeinen
<tomi.valkeinen@nokia.com>
Mon, 10 Jan 2011 09:09:53 +0000
(11:09 +0200)
A null pointer check added. And using kstrdup()
instead of kmalloc() & strcpy()
Signed-off-by: Samreen <samreen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/omapfb/omapfb-main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/video/omap2/omapfb/omapfb-main.c
b/drivers/video/omap2/omapfb/omapfb-main.c
index 6a704f176c222a004f8732268e04cafb82ed1a70..4fdab8e9c4963249ab9d47b19eb33c56a9422fbe 100644
(file)
--- a/
drivers/video/omap2/omapfb/omapfb-main.c
+++ b/
drivers/video/omap2/omapfb/omapfb-main.c
@@
-2132,8
+2132,9
@@
static int omapfb_parse_def_modes(struct omapfb2_device *fbdev)
char *str, *options, *this_opt;
int r = 0;
- str = kmalloc(strlen(def_mode) + 1, GFP_KERNEL);
- strcpy(str, def_mode);
+ str = kstrdup(def_mode, GFP_KERNEL);
+ if (!str)
+ return -ENOMEM;
options = str;
while (!r && (this_opt = strsep(&options, ",")) != NULL) {
This page took
0.026624 seconds
and
5
git commands to generate.