staging: most: cdev: avoid warning about potentially uninitialized variable
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 8 May 2018 09:45:05 +0000 (11:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 May 2018 11:41:50 +0000 (13:41 +0200)
This patch avoids the warning that the pointer mbo might be used
uninitialized that some environmens throw.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/cdev/cdev.c

index 4d7fce8..89d7fc7 100644 (file)
@@ -242,7 +242,7 @@ static ssize_t
 comp_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
 {
        size_t to_copy, not_copied, copied;
-       struct mbo *mbo;
+       struct mbo *mbo = NULL;
        struct comp_channel *c = filp->private_data;
 
        mutex_lock(&c->io_mutex);