scsi: libcxgbi: add check for valid cxgbi_task_data
authorVarun Prakash <varun@chelsio.com>
Sun, 23 Jul 2017 14:31:32 +0000 (20:01 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Jul 2017 02:16:16 +0000 (22:16 -0400)
commit5029271072bf55afa6d836180ee93af09b26ab8b
tree8595fad2ebf5281937802d19d4ae5fefa8f259b3
parent516b7db593f3a541e2e98867575c3c697f41a247
scsi: libcxgbi: add check for valid cxgbi_task_data

In error case it is possible that ->cleanup_task() gets called without
calling ->alloc_pdu() in this case cxgbi_task_data is not valid, so add
a check for for valid cxgbi_task_data in cxgbi_cleanup_task().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxgbi/libcxgbi.c