scsi: g_NCR5380: Fix release_region in error handling
authorOndrej Zary <linux@rainbow-software.org>
Thu, 10 Nov 2016 23:00:20 +0000 (10:00 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 12 Nov 2016 15:42:44 +0000 (10:42 -0500)
commit7b93ca43b7e21fbe6fb1a6f4ecce4a2f70f424a0
treeada0f4fb1212e536b3202bfdd76b1cc9b3bd917f
parentee32c9098f2eff12c0e020aac2acade8250c80e4
scsi: g_NCR5380: Fix release_region in error handling

When a SW-configurable card is specified but not found, the driver
releases wrong region, causing the following message in kernel log:
Trying to free nonexistent resource <0000000000000000-000000000000000f>

Fix it by assigning base earlier.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Fixes: a8cfbcaec0c1 ("scsi: g_NCR5380: Stop using scsi_module.c")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/g_NCR5380.c