mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
tgafb: potential NULL dereference in init
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>
This commit is contained in:
parent
6fc19c40be
commit
0ede5804ca
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user