diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-08-29 14:20:03 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-08-31 08:23:30 +0200 |
commit | a7463d7e35592936142a20a97b938eb83a3cfca8 (patch) | |
tree | ec9d973244e5ca495e2a8b6608dc5fa39aa81748 /drivers/mtd/ubi | |
parent | 1a69ec81a825a13a1a855bbf4c5797421b9445eb (diff) | |
download | barebox-a7463d7e35592936142a20a97b938eb83a3cfca8.tar.gz barebox-a7463d7e35592936142a20a97b938eb83a3cfca8.tar.xz |
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: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/fastmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index c50684a194..5f31f20814 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -148,9 +148,8 @@ static void assign_aeb_to_av(struct ubi_attach_info *ai, struct ubi_ainf_volume *av) { 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) { parent = *p; |