mirror of https://gitee.com/openkylin/linux.git
staging: kpc2000: double unlock in error handling in kpc_dma_transfer()
The goto err_descr_too_many; calls unlock_engine() so this unlocks
twice.
Fixes: 7df95299b9
("staging: kpc2000: Add DMA driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d4c596ebf6
commit
c85aa326f5
|
@ -116,13 +116,11 @@ int kpc_dma_transfer(struct dev_private_data *priv, struct kiocb *kcb, unsigned
|
|||
if (desc_needed >= ldev->desc_pool_cnt){
|
||||
dev_warn(&priv->ldev->pldev->dev, " mapped_entry_count = %d num_descrs_needed = %d num_descrs_avail = %d TOO MANY to ever complete!\n", acd->mapped_entry_count, desc_needed, num_descrs_avail);
|
||||
rv = -EAGAIN;
|
||||
unlock_engine(ldev);
|
||||
goto err_descr_too_many;
|
||||
}
|
||||
if (desc_needed > num_descrs_avail){
|
||||
dev_warn(&priv->ldev->pldev->dev, " mapped_entry_count = %d num_descrs_needed = %d num_descrs_avail = %d Too many to complete right now.\n", acd->mapped_entry_count, desc_needed, num_descrs_avail);
|
||||
rv = -EMSGSIZE;
|
||||
unlock_engine(ldev);
|
||||
goto err_descr_too_many;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue