
From: Adrian Bunk <bunk@stusta.de>

This patch fixes a use after free found by the Coverity checker.

Controller is used in the Failure path.

In the Failure patch, Controller will be freed in the end, so this kfree 
can simply be deleted.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 /dev/null                      |    0 
 25-akpm/drivers/block/DAC960.c |    4 +---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff -puN drivers/block/DAC960.c~drivers-block-dac960c-fix-a-use-after-free drivers/block/DAC960.c
--- 25/drivers/block/DAC960.c~drivers-block-dac960c-fix-a-use-after-free	2005-03-23 19:51:00.000000000 -0800
+++ 25-akpm/drivers/block/DAC960.c	2005-03-23 19:51:00.000000000 -0800
@@ -2700,10 +2700,8 @@ DAC960_DetectController(struct pci_dev *
   Controller->PCIDevice = PCI_Device;
   strcpy(Controller->FullModelName, "DAC960");
 
-  if (pci_enable_device(PCI_Device))  {
-        kfree(Controller);
+  if (pci_enable_device(PCI_Device))
 	goto Failure;
-  }
 
   switch (Controller->HardwareType)
   {
diff -L drivers/block/DAC960.c.old -puN /dev/null /dev/null
_
