Skip to content

Commit

Permalink
samples: configfs: don't reinitialize variables which are already zeroed
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Bartosz Golaszewski authored and Christoph Hellwig committed Oct 7, 2020
1 parent b86ff67 commit 91aad62
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions samples/configfs/configfs_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 91aad62

Please sign in to comment.