summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/mic/vop/vop_vringh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mic/vop/vop_vringh.c b/drivers/misc/mic/vop/vop_vringh.c
index c1dd000f042b..c3613f39eb35 100644
--- a/drivers/misc/mic/vop/vop_vringh.c
+++ b/drivers/misc/mic/vop/vop_vringh.c
@@ -290,9 +290,9 @@ static int vop_virtio_add_device(struct vop_vdev *vdev,
ret = vop_copy_dp_entry(vdev, argp, &type, &dd);
if (ret) {
- kfree(vdev);
dev_err(vop_dev(vdev), "%s %d err %d\n",
__func__, __LINE__, ret);
+ kfree(vdev);
return ret;
}