mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
ubi: remove dead code in validate_vid_hdr()
data_size is already checked against zero when vol_type matches UBI_VID_STATIC. Remove the following dead code. Signed-off-by: Jubin Zhong <zhongjubin@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
92bf22614b
commit
cf0838dfa3
1 changed files with 1 additions and 6 deletions
|
@ -913,12 +913,7 @@ static int validate_vid_hdr(const struct ubi_device *ubi,
|
||||||
ubi_err(ubi, "bad data_size");
|
ubi_err(ubi, "bad data_size");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
} else if (lnum == used_ebs - 1) {
|
} else if (lnum > used_ebs - 1) {
|
||||||
if (data_size == 0) {
|
|
||||||
ubi_err(ubi, "bad data_size at last LEB");
|
|
||||||
goto bad;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ubi_err(ubi, "too high lnum");
|
ubi_err(ubi, "too high lnum");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue