Commit cf0838df authored by Jubin Zhong's avatar Jubin Zhong Committed by Richard Weinberger

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: default avatarJubin Zhong <zhongjubin@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 92bf2261
......@@ -913,12 +913,7 @@ static int validate_vid_hdr(const struct ubi_device *ubi,
ubi_err(ubi, "bad data_size");
goto bad;
}
} else if (lnum == used_ebs - 1) {
if (data_size == 0) {
ubi_err(ubi, "bad data_size at last LEB");
goto bad;
}
} else {
} else if (lnum > used_ebs - 1) {
ubi_err(ubi, "too high lnum");
goto bad;
}
......
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