Skip to content

Commit

Permalink
vfio-mdev: remove some dead code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
  • Loading branch information
Dan Carpenter authored and awilliam committed Jan 11, 2017
1 parent 5c67786 commit 73da426
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions samples/vfio-mdev/mtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 73da426

Please sign in to comment.