lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/12] samples: configfs: don't reinitialize variables which are already zeroed
Date
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The structure containing the storeme field is allocated using kzalloc().
There's no need to set it to 0 again.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
samples/configfs/configfs_sample.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/samples/configfs/configfs_sample.c b/samples/configfs/configfs_sample.c
index d89a1ffea620..20bf3b3e0f0f 100644
--- a/samples/configfs/configfs_sample.c
+++ b/samples/configfs/configfs_sample.c
@@ -192,8 +192,6 @@ static struct config_item *simple_children_make_item(struct config_group *group,
config_item_init_type_name(&simple_child->item, name,
&simple_child_type);

- simple_child->storeme = 0;
-
return &simple_child->item;
}

--
2.17.1
\
 
 \ /
  Last update: 2020-09-24 14:46    [W:0.156 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site