Explorar o código

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 <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy %!s(int64=14) %!d(string=hai) anos
pai
achega
6e5133cc75
Modificáronse 1 ficheiros con 0 adicións e 5 borrados
  1. 0 5
      drivers/mtd/ubi/vmt.c

+ 0 - 5
drivers/mtd/ubi/vmt.c

@@ -790,11 +790,6 @@ static int paranoid_check_volume(struct ubi_device *ubi, int vol_id)
 		goto fail;
 		goto fail;
 	}
 	}
 
 
-	if (!vol->name) {
-		ubi_err("NULL volume name");
-		goto fail;
-	}
-
 	n = strnlen(vol->name, vol->name_len + 1);
 	n = strnlen(vol->name, vol->name_len + 1);
 	if (n != vol->name_len) {
 	if (n != vol->name_len) {
 		ubi_err("bad name_len %lld", n);
 		ubi_err("bad name_len %lld", n);