OSDN Git Service

vfio-mdev: remove some dead code
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 7 Jan 2017 06:30:08 +0000 (09:30 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 11 Jan 2017 19:12:37 +0000 (12:12 -0700)
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>
samples/vfio-mdev/mtty.c

index 382f479..ca49568 100644 (file)
@@ -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;