Commit 54557665 authored by Chengguang Xu's avatar Chengguang Xu Committed by Greg Kroah-Hartman

uio: remove redundant check

It is not necessary to check idev->info several times under
mutex lock, so just remove redundant check.
Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e09cdd5
......@@ -494,7 +494,7 @@ static int uio_open(struct inode *inode, struct file *filep)
goto err_infoopen;
}
if (idev->info && idev->info->open)
if (idev->info->open)
ret = idev->info->open(idev->info, inode);
mutex_unlock(&idev->info_lock);
if (ret)
......@@ -635,7 +635,7 @@ static ssize_t uio_write(struct file *filep, const char __user *buf,
goto out;
}
if (!idev->info || !idev->info->irq) {
if (!idev->info->irq) {
retval = -EIO;
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment