summaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-28 14:31:55 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-28 15:55:15 +0200
commit161309788e426203e1d436abf9a5a845cc19d20c (patch)
tree097bf232d9bc29893273172e633e920fee86df6f /drivers/uio
parent56731c68f335ff0ce49e7d8f4fb45eb7805629be (diff)
uio: remove unneeded variable "ret" in uio_dmem_genirq_open
Fix the following coccicheck warning: drivers/uio/uio_dmem_genirq.c:47:5-8: Unneeded variable: "ret". Return "0" on line 71 Signed-off-by: Jason Yan <yanaijie@huawei.com> Link: https://lore.kernel.org/r/20200428063155.42349-1-yanaijie@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_dmem_genirq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c
index f6ab3f28c838..6e27fe4fcca3 100644
--- a/drivers/uio/uio_dmem_genirq.c
+++ b/drivers/uio/uio_dmem_genirq.c
@@ -44,7 +44,6 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode)
{
struct uio_dmem_genirq_platdata *priv = info->priv;
struct uio_mem *uiomem;
- int ret = 0;
int dmem_region = priv->dmem_region_start;
uiomem = &priv->uioinfo->mem[priv->dmem_region_start];
@@ -68,7 +67,7 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode)
mutex_unlock(&priv->alloc_lock);
/* Wait until the Runtime PM code has woken up the device */
pm_runtime_get_sync(&priv->pdev->dev);
- return ret;
+ return 0;
}
static int uio_dmem_genirq_release(struct uio_info *info, struct inode *inode)