diff mbox series

[net-next] page_pool: remove unnecessary variable init

Message ID 1565872860-63524-1-git-send-email-linyunsheng@huawei.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] page_pool: remove unnecessary variable init | expand

Commit Message

Yunsheng Lin Aug. 15, 2019, 12:41 p.m. UTC
Remove variable initializations in functions that
are followed by assignments before use

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
---
 net/core/page_pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jesper Dangaard Brouer Aug. 15, 2019, 2:56 p.m. UTC | #1
On Thu, 15 Aug 2019 20:41:00 +0800
Yunsheng Lin <linyunsheng@huawei.com> wrote:

> Remove variable initializations in functions that
> are followed by assignments before use
> 
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
David Miller Aug. 15, 2019, 6:50 p.m. UTC | #2
From: Yunsheng Lin <linyunsheng@huawei.com>
Date: Thu, 15 Aug 2019 20:41:00 +0800

> Remove variable initializations in functions that
> are followed by assignments before use
> 
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>

Applied.
diff mbox series

Patch

diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index 3272dc7..31187ff 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -61,7 +61,7 @@  static int page_pool_init(struct page_pool *pool,
 struct page_pool *page_pool_create(const struct page_pool_params *params)
 {
 	struct page_pool *pool;
-	int err = 0;
+	int err;
 
 	pool = kzalloc_node(sizeof(*pool), GFP_KERNEL, params->nid);
 	if (!pool)