summaryrefslogtreecommitdiff
path: root/samples/vfio-mdev
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-01-07 09:30:08 +0300
committerAlex Williamson <alex.williamson@redhat.com>2017-01-11 12:12:37 -0700
commit73da4268fdbae972f617946d1c690f2136964802 (patch)
tree8a7c3341dd0456146c5e93d91a3dbd8b33f7b30a /samples/vfio-mdev
parent5c677869e0abbffbade2cfd82d46d0eebe823f34 (diff)
downloadlinux-rpi-73da4268fdbae972f617946d1c690f2136964802.tar.gz
linux-rpi-73da4268fdbae972f617946d1c690f2136964802.tar.bz2
linux-rpi-73da4268fdbae972f617946d1c690f2136964802.zip
vfio-mdev: remove some dead code
We set info.count to 1 in mtty_get_irq_info() so static checkers complain that, "Why do we have impossible conditions?" The answer is that it seems to be left over dead code that can be safely removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples/vfio-mdev')
-rw-r--r--samples/vfio-mdev/mtty.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index 382f4797428f..ca495686b9c3 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -1230,9 +1230,6 @@ static long mtty_ioctl(struct mdev_device *mdev, unsigned int cmd,
if (ret)
return ret;
- if (info.count == -1)
- return -EINVAL;
-
if (copy_to_user((void __user *)arg, &info, minsz))
return -EFAULT;