Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2f0193a authored by Sumukh Hallymysore Ravindra's avatar Sumukh Hallymysore Ravindra
Browse files

msm: synx: change kzalloc to vzalloc



Change the memory allocation function to vzalloc
as there is no need for physically contiguous memory
for the client structure.

Change-Id: Ic6377953c6acc6442eea8fbee2e1798ac32ebebb
Signed-off-by: default avatarSumukh Hallymysore Ravindra <shallymy@codeaurora.org>
parent 17c22334
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>

#include "synx_api.h"
#include "synx_util.h"
@@ -1435,7 +1436,7 @@ int synx_initialize(struct synx_session *session_id,
		bit = test_and_set_bit(idx, synx_dev->bitmap);
	} while (bit);

	client = kzalloc(sizeof(*client), GFP_KERNEL);
	client = vzalloc(sizeof(*client));
	if (!client) {
		clear_bit(idx, synx_dev->bitmap);
		return -ENOMEM;
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#include <linux/slab.h>
#include <linux/random.h>
#include <linux/vmalloc.h>

#include "synx_api.h"
#include "synx_util.h"
@@ -975,7 +976,7 @@ static void synx_client_destroy(struct kref *kref)

	pr_info("[sess: %u] session destroyed %s\n",
		client->id, client->name);
	kfree(client);
	vfree(client);
}

void synx_put_client(struct synx_client *client)