diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2015-06-25 15:13:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-29 01:54:32 +0200 |
commit | 2e598712e4b36256c3cf3bca1c2bf0460036cc89 (patch) | |
tree | 497e965ad125731b07da1cf5d3ced85d7e8e80e6 | |
parent | flow_dissector: Pre-initialize ip_proto in __skb_flow_dissect() (diff) | |
download | linux-2e598712e4b36256c3cf3bca1c2bf0460036cc89.tar.xz linux-2e598712e4b36256c3cf3bca1c2bf0460036cc89.zip |
drivers: net: xgene: Pre-initialize ret in xgene_enet_get_resources()
If CONFIG_ACPI=n:
drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_get_resources’:
drivers/net/ethernet/apm/xgene/xgene_enet_main.c:951: warning: ‘ret’ may be used uninitialized in this function
If the driver is bound to a legacy platform device, ret will contain
arbitrary data. If it is non-zero, it will be returned to the caller as
an error code.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index 95153b234c71..299eb4315fe6 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -948,7 +948,7 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) struct resource *res; void __iomem *base_addr; u32 offset; - int ret; + int ret = 0; pdev = pdata->pdev; dev = &pdev->dev; |