From: Artem Bityutskiy Date: Fri, 25 Mar 2011 16:48:59 +0000 (+0200) Subject: UBI: do not compare array with NULL X-Git-Tag: firefly_0821_release~7613^2~1680^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e5133cc757912e7ba2bfbbfb384667707f45ec3;p=firefly-linux-kernel-4.4.55.git UBI: do not compare array with NULL Coverity spotted that UBI debugging code tries to compare an array and NULL, which obviously makes little sense. Kill this check. Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index b79e0dea3632..366eb70219a6 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -790,11 +790,6 @@ static int paranoid_check_volume(struct ubi_device *ubi, int vol_id) goto fail; } - if (!vol->name) { - ubi_err("NULL volume name"); - goto fail; - } - n = strnlen(vol->name, vol->name_len + 1); if (n != vol->name_len) { ubi_err("bad name_len %lld", n);