diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-02-12 01:44:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-14 20:42:37 -0500 |
commit | 59ea25904406a606d1329650e45e13e682e89320 (patch) | |
tree | 8584735b93a6f0777a3383559597abd3f8bbd88e | |
parent | 6ddf2f0cb1e1931d16e08e30130ed04e5a441f2c (diff) |
misc: mic: silence an overflow warning
Static checkers complain that the this is a potential array overflow.
We verify that it's not on the next line so this code is OK, but
static checker warnings are annoying.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mic/vop/vop_vringh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c index c3613f39eb35..e94c7fb6712a 100644 --- a/drivers/misc/mic/vop/vop_vringh.c +++ b/drivers/misc/mic/vop/vop_vringh.c | |||
@@ -848,12 +848,13 @@ static int vop_virtio_copy_desc(struct vop_vdev *vdev, | |||
848 | struct mic_copy_desc *copy) | 848 | struct mic_copy_desc *copy) |
849 | { | 849 | { |
850 | int err; | 850 | int err; |
851 | struct vop_vringh *vvr = &vdev->vvr[copy->vr_idx]; | 851 | struct vop_vringh *vvr; |
852 | 852 | ||
853 | err = vop_verify_copy_args(vdev, copy); | 853 | err = vop_verify_copy_args(vdev, copy); |
854 | if (err) | 854 | if (err) |
855 | return err; | 855 | return err; |
856 | 856 | ||
857 | vvr = &vdev->vvr[copy->vr_idx]; | ||
857 | mutex_lock(&vvr->vr_mutex); | 858 | mutex_lock(&vvr->vr_mutex); |
858 | if (!vop_vdevup(vdev)) { | 859 | if (!vop_vdevup(vdev)) { |
859 | err = -ENODEV; | 860 | err = -ENODEV; |