Skip to content

Commit

Permalink
UBI: do not compare array with NULL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Apr 5, 2011
1 parent 3efe509 commit 6e5133c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/mtd/ubi/vmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6e5133c

Please sign in to comment.