]> git.karo-electronics.de Git - linux-beck.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:29 +0000 (11:39 +0100)
commit5157e98aa024c5ef3d5c3b27cb7203f34073ed26
treef44e10bb68a95a7f011cd42c8910650983d5afb4
parentd451b3cc89c7f0c037281272d70539cd612ba539
scsi: g_NCR5380: Fix release_region in error handling

commit 7b93ca43b7e21fbe6fb1a6f4ecce4a2f70f424a0 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/g_NCR5380.c