Skip to contentSkip to conversation

xen: remove redundant initialization of variable ret

PATCH Applied Jing Xiangfeng 3 participants 3 messages Sep 19, 2020 – Sep 30, 2020 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: remove redundant initialization of variable ret

After commit 9f51c05dc41a ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it.

---
 drivers/xen/pvcalls-front.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/pvcalls-front.c +1 -1
index 72d725a0ab5c..7984645b5956 100644
@@ -371,7 +371,7 @@ static int alloc_active_ring(struct sock_mapping *map)
 static int create_active(struct sock_mapping *map, evtchn_port_t *evtchn)
 {
 	void *bytes;
-	int ret = -ENOMEM, irq = -1, i;
+	int ret, irq = -1, i;
 
 	*evtchn = 0;
 	init_waitqueue_head(&map->active.inflight_conn_req);
Signature · 1 line
2.17.1