mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
arcmsr: fixes not release allocated resource
[ Upstream commit 98f90debc2 ]
Releasing allocated resource if get configuration data failed.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c77d6c3c88
commit
def391c897
@@ -2664,7 +2664,7 @@ static bool arcmsr_hbaB_get_config(struct AdapterControlBlock *acb)
|
|||||||
if (!arcmsr_hbaB_wait_msgint_ready(acb)) {
|
if (!arcmsr_hbaB_wait_msgint_ready(acb)) {
|
||||||
printk(KERN_NOTICE "arcmsr%d: wait 'get adapter firmware \
|
printk(KERN_NOTICE "arcmsr%d: wait 'get adapter firmware \
|
||||||
miscellaneous data' timeout \n", acb->host->host_no);
|
miscellaneous data' timeout \n", acb->host->host_no);
|
||||||
return false;
|
goto err_free_dma;
|
||||||
}
|
}
|
||||||
count = 8;
|
count = 8;
|
||||||
while (count){
|
while (count){
|
||||||
@@ -2707,6 +2707,10 @@ static bool arcmsr_hbaB_get_config(struct AdapterControlBlock *acb)
|
|||||||
acb->firm_cfg_version = readl(®->message_rwbuffer[25]); /*firm_cfg_version,25,100-103*/
|
acb->firm_cfg_version = readl(®->message_rwbuffer[25]); /*firm_cfg_version,25,100-103*/
|
||||||
/*firm_ide_channels,4,16-19*/
|
/*firm_ide_channels,4,16-19*/
|
||||||
return true;
|
return true;
|
||||||
|
err_free_dma:
|
||||||
|
dma_free_coherent(&acb->pdev->dev, acb->roundup_ccbsize,
|
||||||
|
acb->dma_coherent2, acb->dma_coherent_handle2);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB)
|
static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB)
|
||||||
|
|||||||
Reference in New Issue
Block a user