summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-07-12 10:54:11 +0200
committerStefan Agner <stefan.agner@toradex.com>2016-07-14 11:22:00 -0700
commita2c0ec90da069549155afbd3329ffe3e2de1413b (patch)
tree774a9053ef68c6355b1ca735e45af3a7e35db3bc
parentbf659a4c222e61a265715e2dae5ee95435b592b7 (diff)
fs/namespace.c: silence compiler warning
fs/namespace.c:2721:6: warning: 'kernel_dev' may be used uninitialized in this function [-Wmaybe-uninitialized] ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags, ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (void *) data_page); ~~~~~~~~~~~~~~~~~~~ fs/namespace.c:2721:6: warning: 'kernel_type' may be used uninitialized in this function [-Wmaybe-uninitialized] ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags, ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--fs/namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index fc99d18..77c3b86 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2695,9 +2695,9 @@ SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name,
char __user *, type, unsigned long, flags, void __user *, data)
{
int ret;
- char *kernel_type;
+ char *kernel_type = NULL;
struct filename *kernel_dir;
- char *kernel_dev;
+ char *kernel_dev = NULL;
unsigned long data_page;
ret = copy_mount_string(type, &kernel_type);