[PATCH 3.4 157/172] hpsa: fix memory leak in kdump hard reset

lizf
2015-06-16T08:58:13Z

From: Tomas Henzl <thenzl@redhat.com>

3.4.108-rc1 review patch. If anyone has any objections, please let me know.

------------------

commit 03741d956eaac31264952e0afa181b62713892a5 upstream.

There is a potential memory leak in hpsa_kdump_hard_reset_controller.

Reviewed-by: Don Brace <don.brace@pmcs.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Vinson Lee <vlee@twopensource.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index cdff47e..f5ccdcdf 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3530,7 +3530,7 @@ static __devinit int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev)
}
rc = write_driver_ver_to_cfgtable(cfgtable);
if (rc)
- goto unmap_vaddr;
+ goto unmap_cfgtable;

/* If reset via doorbell register is supported, use that.
* There are two such methods. Favor the newest method.
--
1.9.1