2020-09-19 03:18:52

by Jing Xiangfeng

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Jing Xiangfeng <[email protected]>
---
drivers/xen/pvcalls-front.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 72d725a0ab5c..7984645b5956 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -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);
--
2.17.1


2020-09-22 08:45:45

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH] xen: remove redundant initialization of variable ret

On 19.09.20 05:17, Jing Xiangfeng wrote:
> 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.
>
> Signed-off-by: Jing Xiangfeng <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen

2020-09-30 14:16:00

by Boris Ostrovsky

[permalink] [raw]
Subject: Re: [PATCH] xen: remove redundant initialization of variable ret


On 9/18/20 11:17 PM, Jing Xiangfeng wrote:
> 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.
>
> Signed-off-by: Jing Xiangfeng <[email protected]>


Applied to for-linus-5.10



-boris