Skip to content

Commit 59ea259

Browse files
Dan Carpentergregkh
authored andcommitted
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>
1 parent 6ddf2f0 commit 59ea259

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/misc/mic/vop/vop_vringh.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,12 +848,13 @@ static int vop_virtio_copy_desc(struct vop_vdev *vdev,
848848
struct mic_copy_desc *copy)
849849
{
850850
int err;
851-
struct vop_vringh *vvr = &vdev->vvr[copy->vr_idx];
851+
struct vop_vringh *vvr;
852852

853853
err = vop_verify_copy_args(vdev, copy);
854854
if (err)
855855
return err;
856856

857+
vvr = &vdev->vvr[copy->vr_idx];
857858
mutex_lock(&vvr->vr_mutex);
858859
if (!vop_vdevup(vdev)) {
859860
err = -ENODEV;

0 commit comments

Comments
 (0)