From: Grant Likely Date: Sun, 2 Dec 2007 05:10:03 +0000 (-0700) Subject: gianfar: fix compile warning X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f9663aea2a938f9dc60dbfef34b9e7847a69c947;p=openwrt%2Fstaging%2Fblogic.git gianfar: fix compile warning Eliminate an uninitialized variable warning. The code is correct, but a pointer to the automatic variable 'addr' is passed to dma_alloc_coherent. Since addr has never been initialized, and the compiler doesn't know what dma_alloc_coherent will do with it, it complains. Signed-off-by: Grant Likely Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 38268d7335a8..0431e9ed0fac 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -696,7 +696,7 @@ int startup_gfar(struct net_device *dev) { struct txbd8 *txbdp; struct rxbd8 *rxbdp; - dma_addr_t addr; + dma_addr_t addr = 0; unsigned long vaddr; int i; struct gfar_private *priv = netdev_priv(dev);