diff options
author | David Matlack <dmatlack@google.com> | 2014-05-05 21:02:35 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-23 20:08:34 +0900 |
commit | 9bc97445a39d37d4092a6a268b7dac93beb86f13 (patch) | |
tree | ca5c53da2aa2f7d3f35447e30f2b8d44fb13be84 | |
parent | 04cc3c8a8013ea966e4623e0f20ba49529eac2ab (diff) |
staging: slicoss: fix dma memory leak
This patch fixes a memory leak in slic_card_init. If the driver fails
to poll for an interrupt after requesting config data from the device
the dma memory is never freed.
Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/slicoss/slicoss.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index db51cd29f225..fea584517e78 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -2851,6 +2851,9 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) &slic_regs->slic_isp, 0, &slic_regs->slic_addr_upper, 0, FLUSH); + pci_free_consistent(adapter->pcidev, + sizeof(struct slic_eeprom), + peeprom, phys_config); return -EINVAL; } } |