diff options
author | Arnd Bergmann <arnd@arndb.de> | 2020-01-08 00:24:52 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-01-09 22:09:55 +0300 |
commit | de08b5ac10420db597cb24c41b4d8d06cce15ffd (patch) | |
tree | c3ba0932b7b949f3aa724850774a9ea599fb816f /scripts/bpf_helpers_doc.py | |
parent | 8bcef0d54067077cf9a6cb129022c77559926e8c (diff) | |
download | linux-de08b5ac10420db597cb24c41b4d8d06cce15ffd.tar.xz |
mtd: sm_ftl: fix NULL pointer warning
With gcc -O3, we get a new warning:
In file included from arch/arm64/include/asm/processor.h:28,
from drivers/mtd/sm_ftl.c:8:
In function 'memset',
inlined from 'sm_read_sector.constprop' at drivers/mtd/sm_ftl.c:250:3:
include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull]
return __builtin_memset(p, c, size);
>From all I can tell, this cannot happen (the function is called
either with a NULL buffer or with a -1 block number but not both),
but adding a check makes it more robust and avoids the warning.
Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions