From: Dan Carpenter Date: Sun, 1 Apr 2012 15:57:59 +0000 (+0300) Subject: UBIFS: remove douple initialization in change_category() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=273946a5c507ff5bce12349143470e8629bbe0a7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git UBIFS: remove douple initialization in change_category() "heap" is initialized twice. I removed the first one, because it makes Smatch complain that we use "new_cat" as an offset before checking it. This doesn't change how the code works, it's just a cleanup. Signed-off-by: Dan Carpenter Signed-off-by: Artem Bityutskiy --- diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index f8a181e647cc..b5c95a69d95f 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c @@ -447,7 +447,7 @@ static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops) int new_cat = ubifs_categorize_lprops(c, lprops); if (old_cat == new_cat) { - struct ubifs_lpt_heap *heap = &c->lpt_heap[new_cat - 1]; + struct ubifs_lpt_heap *heap; /* lprops on a heap now must be moved up or down */ if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)