summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-06-17 22:47:31 +0200
committerTom Rini <trini@ti.com>2014-07-18 17:53:22 -0400
commitc15df21fe79d420344a3ecb1bb60b8f97c6dec2e (patch)
treeb4b123726d6bf63c3dc7920f26938e7256bcd9f3 /drivers
parent524123a70761110c5cf3ccc5f52f6d4da071b959 (diff)
mtd: cfi_flash: fix clang warning
clang warns this check is silly; it is since s is a local variable. u-boot/drivers/mtd/cfi_flash.c:2363:13: warning: comparison of array 's' not equal to a null pointer is always true else if ((s != NULL) && (strcmp(s, "yes") == 0)) { cc: Stefan Roese <sr@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/cfi_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index a389cd101c..c4b5bc1de5 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2360,7 +2360,7 @@ unsigned long flash_init (void)
#endif /* CONFIG_SYS_FLASH_QUIET_TEST */
}
#ifdef CONFIG_SYS_FLASH_PROTECTION
- else if ((s != NULL) && (strcmp(s, "yes") == 0)) {
+ else if (strcmp(s, "yes") == 0) {
/*
* Only the U-Boot image and it's environment
* is protected, all other sectors are