lkml.org 
[lkml]   [2008]   [Apr]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSun, 27 Apr 2008 00:12:22 -0700
From"Chris Peterson" <>
Subject[PATCH] fix uninitialized variable warning in crypto/async_tx/async_tx.c
This patch against linux-2.6.25-git7.

/mnt/westside/vol/silver/cpeterso/tmp/linux/linux-2.6.25/crypto/async_tx/async_tx.c:
In function `async_trigger_callback':
/mnt/westside/vol/silver/cpeterso/tmp/linux/linux-2.6.25/crypto/async_tx/async_tx.c:584:
warning: `chan' might be used uninitialized in this function

chris


Signed-off-by: Chris Peterson <cpeterso@cpeterso.com>
---
diff -Naur linux-2.6.25-git7/crypto/async_tx/async_tx.c
linux-2.6.25-git7+patch/crypto/async_tx/async_tx.c
--- linux-2.6.25-git7/crypto/async_tx/async_tx.c	2008-04-25
22:46:24.000000000 -0700
+++ linux-2.6.25-git7+patch/crypto/async_tx/async_tx.c	2008-04-25
23:39:44.000000000 -0700
@@ -596,8 +596,11 @@
 			device = NULL;

 		tx = device ? device->device_prep_dma_interrupt(chan, 0) : NULL;
-	} else
+	} else {
+		chan = NULL;
+		device = NULL;
 		tx = NULL;
+	}

 	if (tx) {
 		pr_debug("%s: (async)\n", __func__);

\
 
 \ /
  Last update: 2008-04-27 09:15    [from the cache]
©2003-2008