diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-10-29 16:14:26 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-01-17 23:48:02 +0300 |
commit | f50629df49f59b044c89f99a4bcd02cafdb38258 (patch) | |
tree | a717c9aed0d1dd0af22df5b5b4fd54bb91dda746 /drivers/mtd | |
parent | af7bcee27652bbf2502207500ad200763707a160 (diff) | |
download | linux-f50629df49f59b044c89f99a4bcd02cafdb38258.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>
Diffstat (limited to 'drivers/mtd')
-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 717db749808a..91705962ba73 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -214,9 +214,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; |