projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3efe509
)
UBI: do not compare array with NULL
author
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Fri, 25 Mar 2011 16:48:59 +0000
(18:48 +0200)
committer
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Tue, 5 Apr 2011 08:08:58 +0000
(11:08 +0300)
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>
drivers/mtd/ubi/vmt.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/vmt.c
b/drivers/mtd/ubi/vmt.c
index b79e0dea36320720f7b931010ae6416b1a177a8d..366eb70219a65bb0a5aca0ccaed329b470ab1b83 100644
(file)
--- 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);