From: Krzysztof Helt [EMAIL PROTECTED]
This patch fixes call to wait_for_completion_timeout()
with NULL argument.
Signed-off-by: Krzysztof Helt [EMAIL PROTECTED]
---
diff -urp linux-ref/drivers/scsi/sym53c8xx_2/sym_glue.c
linux-new/drivers/scsi/sym53c8xx_2/sym_glue.c
--- linux-ref/drivers/scsi/sym53c8xx_2/sym_glue.c 2007-10-28
11:11:02.0 +0100
+++ linux-new/drivers/scsi/sym53c8xx_2/sym_glue.c 2007-10-28
14:25:08.0 +0100
@@ -609,8 +609,7 @@ static int sym_eh_handler(int op, char *
*/
#define WAIT_FOR_PCI_RECOVERY 35
if (pci_channel_offline(pdev)) {
- struct completion *io_reset;
- int finished_reset = 0;
+ struct completion *io_reset = NULL;
init_completion(eh_done);
spin_lock_irq(shost-host_lock);
/* Make sure we didn't race */
@@ -618,15 +617,12 @@ static int sym_eh_handler(int op, char *
if (!sym_data-io_reset)
sym_data-io_reset = eh_done;
io_reset = sym_data-io_reset;
- } else {
- finished_reset = 1;
}
spin_unlock_irq(shost-host_lock);
- if (!finished_reset)
- finished_reset = wait_for_completion_timeout(io_reset,
- WAIT_FOR_PCI_RECOVERY*HZ);
- if (!finished_reset)
- return SCSI_FAILED;
+ if (io_reset
+ !wait_for_completion_timeout(io_reset,
+WAIT_FOR_PCI_RECOVERY * HZ))
+ return SCSI_FAILED;
}
spin_lock_irq(shost-host_lock);
--
Walcz z zombie jako kosmiczny marine!
Kliknij http://link.interia.pl/f1cc3
-
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html