Skip to content
Snippets Groups Projects
Commit 55616b86 authored by Tom Rini's avatar Tom Rini
Browse files

pci_rom.c: Fix may be used uninitialized warning


With gcc-5.x we get:
drivers/pci/pci_rom.c: In function 'dm_pci_run_vga_bios':
drivers/pci/pci_rom.c:352:3: warning: 'ram' may be used uninitialized in
this function [-Wmaybe-uninitialized]

While unconvinced that this can happen in practice (if we malloc we set
alloced to true, it will be false otherwise), silence the compiler.

Signed-off-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 5b8031cc
No related branches found
No related tags found
No related merge requests found
...@@ -266,7 +266,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), ...@@ -266,7 +266,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void),
int exec_method) int exec_method)
{ {
struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
struct pci_rom_header *rom, *ram; struct pci_rom_header *rom, *ram = NULL;
int vesa_mode = -1; int vesa_mode = -1;
bool emulate, alloced; bool emulate, alloced;
int ret; int ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment