Merge "msm: synx: change kzalloc to vzalloc"

This commit is contained in:
qctecmdr 2020-04-13 10:50:17 -07:00 • committed by Gerrit - the friendly Code Review server
commit 7601e2470f
2 changed files with 4 additions and 2 deletions

View file

@ -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;

View file

@ -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)