OSDN Git Service

soc: qcom: secure_buffer: Fix an uninitialized variable
authorPatrick Daly <pdaly@codeaurora.org>
Mon, 14 Nov 2016 22:51:39 +0000 (14:51 -0800)
committerPatrick Daly <pdaly@codeaurora.org>
Mon, 14 Nov 2016 23:00:09 +0000 (15:00 -0800)
Ensure variables are set before the are used to prevent random behavior.

Change-Id: Ib31e5aca648c0f442afe4cbe576ad79786fe6427
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
drivers/soc/qcom/secure_buffer.c

index d9ebc1e..ac004a5 100644 (file)
@@ -260,7 +260,7 @@ int hyp_assign_table(struct sg_table *table,
                        int *dest_vmids, int *dest_perms,
                        int dest_nelems)
 {
-       int ret;
+       int ret = 0;
        struct scm_desc desc = {0};
        u32 *source_vm_copy;
        size_t source_vm_copy_size;