From f7364ba04b0961f3a1f978bbe77102606801e35f Mon Sep 17 00:00:00 2001
From: wwang <wei_wang@realsil.com.cn>
Date: Mon, 31 Oct 2011 15:02:53 +0800
Subject: [PATCH] staging:rts_pstor:Complete scanning_done variable
Git-commit: f7364ba04b0961f3a1f978bbe77102606801e35f
Patch-mainline: 3.2-rc5
References: bnc#762329

Complete scanning_done variable if rtsx-scan thread created failed.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/staging/rts_pstor/rtsx.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/staging/rts_pstor/rtsx.c
+++ b/drivers/staging/rts_pstor/rtsx.c
@@ -1013,6 +1013,7 @@ static int __devinit rtsx_probe(struct p
 	th = kthread_create(rtsx_scan_thread, dev, "rtsx-scan");
 	if (IS_ERR(th)) {
 		printk(KERN_ERR "Unable to start the device-scanning thread\n");
+		complete(&dev->scanning_done);
 		quiesce_and_remove_host(dev);
 		err = PTR_ERR(th);
 		goto errout;
