staging: vchiq: Fix an uninitialized variable
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 30 Sep 2020 12:30:36 +0000 (15:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 08:55:17 +0000 (10:55 +0200)
Smatch complains that "userdata" can be passed to vchiq_bulk_transfer()
without being initialized.  This leads to a potential information leak
later on.

Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200930123036.GC4282@kadam
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

index 5904155..71b9627 100644 (file)
@@ -952,7 +952,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance,
 {
        struct vchiq_service *service;
        struct bulk_waiter_node *waiter = NULL;
-       void *userdata;
+       void *userdata = NULL;
        int status = 0;
        int ret;