Patchwork : niu: fix uninitialized variable warning

login
register
mail settings
Submitter Prarit Bhargava
Date May 27, 2010, 6:35 p.m.
Message ID <20100527183100.24251.12228.sendpatchset@prarit.bos.redhat.com>
Download mbox | patch
Permalink /patch/53776/
State Rejected
Delegated to: David Miller
Headers show

Comments

Prarit Bhargava - May 27, 2010, 6:35 p.m.
Fixes warning:

drivers/net/niu.c: In function ‘niu_process_rx_pkt’:
drivers/net/niu.c:3457: error: ‘link’ may be used uninitialized in this function

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 30abb4e..3ace57b 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3454,7 +3454,7 @@  static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
 
 	num_rcr = 0;
 	while (1) {
-		struct page *page, **link;
+		struct page *page, **uninitialized_var(link);
 		u32 rcr_size, append_size;
 		u64 addr, val, off;