diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-15 12:52:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-20 09:18:45 +0200 |
commit | c85aa326f5c5cc73bad4381498fd2bda1bb41c27 (patch) | |
tree | 2fb749cbdc3e8c2d9ce818dc3cb12f964c562ac6 /drivers/staging | |
parent | d4c596ebf62760b89ec3d0a2cbc94e2632395eec (diff) |
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: 7df95299b94a ("staging: kpc2000: Add DMA driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/kpc2000/kpc_dma/fileops.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c index 0886ad408b0e..616658709bd9 100644 --- a/drivers/staging/kpc2000/kpc_dma/fileops.c +++ b/drivers/staging/kpc2000/kpc_dma/fileops.c @@ -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; } |