vhost: (cosmetic) remove a superfluous variable initialisation
authorGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Wed, 27 May 2020 18:05:38 +0000 (20:05 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Jun 2020 19:36:51 +0000 (15:36 -0400)
Even the compiler is able to figure out that in this case the
initialisation is superfluous.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200527180541.5570-3-guennadi.liakhovetski@linux.intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c

index a40d16bdebb5e69a726b1abe6589cc3e7ddee752..534d1267b761d23c91a4115e1b8eabc07782da4d 100644 (file)
@@ -920,7 +920,7 @@ static inline void __user *__vhost_get_user(struct vhost_virtqueue *vq,
 
 #define vhost_put_user(vq, x, ptr)             \
 ({ \
-       int ret = -EFAULT; \
+       int ret; \
        if (!vq->iotlb) { \
                ret = __put_user(x, ptr); \
        } else { \