projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc19c4
)
tgafb: potential NULL dereference in init
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 16 Dec 2013 09:49:23 +0000
(12:49 +0300)
committer
Tomi Valkeinen
<tomi.valkeinen@ti.com>
Fri, 17 Jan 2014 08:57:48 +0000
(10:57 +0200)
Static checkers complain that there are paths where "tga_type_name" can
be NULL. I've re-arranged the code slightly so that's impossible.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/tgafb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/video/tgafb.c
b/drivers/video/tgafb.c
index 5e94c6e4f682b83cb33926400aae19b3f4af85b7..07c7df9ee77bbd54347fdf211066a2c03b227db1 100644
(file)
--- a/
drivers/video/tgafb.c
+++ b/
drivers/video/tgafb.c
@@
-1490,10
+1490,9
@@
tgafb_init_fix(struct fb_info *info)
if (tga_bus_tc)
tga_type_name = "Digital ZLX-E3";
break;
- default:
- tga_type_name = "Unknown";
- break;
}
+ if (!tga_type_name)
+ tga_type_name = "Unknown";
strlcpy(info->fix.id, tga_type_name, sizeof(info->fix.id));