target: NULL dereference on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Jul 2012 07:07:34 +0000 (10:07 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 20 Jul 2012 18:34:21 +0000 (11:34 -0700)
During a failure in transport_add_device_to_core_hba() code, we called
destroy_workqueue(dev->tmr_wq) before ->tmr_wq was allocated which leads
to an oops.

This fixes a regression introduced in with:

commit af8772926f019b7bddd7477b8de5f3b0f12bad21
Author: Christoph Hellwig <hch@infradead.org>
Date:   Sun Jul 8 15:58:49 2012 -0400

    target: replace the processing thread with a TMR work queue

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

No differences found