From: Grant Likely Date: Sun, 2 Dec 2007 05:10:03 +0000 (-0700) Subject: gianfar: fix compile warning X-Git-Tag: v2.6.24-rc5~106^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9663aea2a938f9dc60dbfef34b9e7847a69c947;p=linux-2.6 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 38268d7335..0431e9ed0f 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);