From: Bin Meng Date: Thu, 18 Feb 2016 07:14:47 +0000 (-0800) Subject: pci: Fix compiler warnings in dm_pciauto_setup_device() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=6796704b0dfb4f98cb4a026988e9739884812b5c;p=u-boot.git pci: Fix compiler warnings in dm_pciauto_setup_device() Fix the following compiler warnings when DEBUG is on. warning: 'bar_res' may be used uninitialized in this function. drivers/pci/pci_auto.c:101:21: if (!enum_only && pciauto_region_allocate(bar_res, bar_size, ^ Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 88bc416c61..ee9a854bda 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -30,7 +30,7 @@ void dm_pciauto_setup_device(struct udevice *dev, int bars_num, u8 header_type; int rom_addr; pci_addr_t bar_value; - struct pci_region *bar_res; + struct pci_region *bar_res = NULL; int found_mem64 = 0; u16 class;