Commit f50629df authored by Colin Ian King's avatar Colin Ian King Committed by Richard Weinberger

ubi: fastmap: Clean up the initialization of pointer p

The pointer p is being initialized with one value and a few lines
later being set to a newer replacement value. Clean up the code by
using the latter assignment to p as the initial value. Cleans up
clang warning:

drivers/mtd/ubi/fastmap.c:217:19: warning: Value stored to 'p'
during its initialization is never read
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent af7bcee2
...@@ -214,9 +214,8 @@ static void assign_aeb_to_av(struct ubi_attach_info *ai, ...@@ -214,9 +214,8 @@ static void assign_aeb_to_av(struct ubi_attach_info *ai,
struct ubi_ainf_volume *av) struct ubi_ainf_volume *av)
{ {
struct ubi_ainf_peb *tmp_aeb; struct ubi_ainf_peb *tmp_aeb;
struct rb_node **p = &ai->volumes.rb_node, *parent = NULL; struct rb_node **p = &av->root.rb_node, *parent = NULL;
p = &av->root.rb_node;
while (*p) { while (*p) {
parent = *p; parent = *p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment