[SCSI] scsi_transport_spi: fix for unbalanced reference counting
authorMike Maslenkin <mihailm@parallels.com>
Sat, 28 Apr 2012 01:32:14 +0000 (05:32 +0400)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 10 May 2012 08:06:12 +0000 (09:06 +0100)
commit89a342ca6bfc1a014ff50cce5659abc58e11ecfc
treee6e7760d0b953f3f76f3dfd7d16bbcbddca3ab26
parent9ebd99c599bcb125acde9b3c98383ebd6e208bc1
[SCSI] scsi_transport_spi: fix for unbalanced reference counting

Check the domain validation flag on the given device before referencing
scsi_device instance, otherwise if the flag is already set we return without
decrementing the reference count.

Signed-off-by: Mike Maslenkin <mihailm@parallels.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_transport_spi.c