Loading drivers/soc/qcom/msm_glink_pkt.c +10 −7 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -29,6 +29,7 @@ #include <asm/ioctls.h> #include <linux/mm.h> #include <linux/of.h> #include <linux/vmalloc.h> #include <linux/ipc_logging.h> #include <linux/termios.h> Loading Loading @@ -399,7 +400,7 @@ void glink_pkt_notify_tx_done(void *handle, const void *priv, GLINK_PKT_INFO("%s(): priv[%p] pkt_priv[%p] ptr[%p]\n", __func__, priv, pkt_priv, ptr); /* Free Tx buffer allocated in glink_pkt_write */ kfree(ptr); kvfree(ptr); } /** Loading Loading @@ -774,7 +775,9 @@ ssize_t glink_pkt_write(struct file *file, __func__, devp->i, count); data = kzalloc(count, GFP_KERNEL); if (!data) { GLINK_PKT_ERR("%s buffer allocation failed\n", __func__); if (!strcmp(devp->open_cfg.edge, "bg")) data = vzalloc(count); if (!data) return -ENOMEM; } Loading @@ -783,14 +786,14 @@ ssize_t glink_pkt_write(struct file *file, GLINK_PKT_ERR( "%s copy_from_user failed ret[%d] on dev id:%d size %zu\n", __func__, ret, devp->i, count); kfree(data); kvfree(data); return -EFAULT; } ret = glink_tx(devp->handle, data, data, count, GLINK_TX_REQ_INTENT); if (ret) { GLINK_PKT_ERR("%s glink_tx failed ret[%d]\n", __func__, ret); kfree(data); kvfree(data); return ret; } Loading Loading
drivers/soc/qcom/msm_glink_pkt.c +10 −7 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -29,6 +29,7 @@ #include <asm/ioctls.h> #include <linux/mm.h> #include <linux/of.h> #include <linux/vmalloc.h> #include <linux/ipc_logging.h> #include <linux/termios.h> Loading Loading @@ -399,7 +400,7 @@ void glink_pkt_notify_tx_done(void *handle, const void *priv, GLINK_PKT_INFO("%s(): priv[%p] pkt_priv[%p] ptr[%p]\n", __func__, priv, pkt_priv, ptr); /* Free Tx buffer allocated in glink_pkt_write */ kfree(ptr); kvfree(ptr); } /** Loading Loading @@ -774,7 +775,9 @@ ssize_t glink_pkt_write(struct file *file, __func__, devp->i, count); data = kzalloc(count, GFP_KERNEL); if (!data) { GLINK_PKT_ERR("%s buffer allocation failed\n", __func__); if (!strcmp(devp->open_cfg.edge, "bg")) data = vzalloc(count); if (!data) return -ENOMEM; } Loading @@ -783,14 +786,14 @@ ssize_t glink_pkt_write(struct file *file, GLINK_PKT_ERR( "%s copy_from_user failed ret[%d] on dev id:%d size %zu\n", __func__, ret, devp->i, count); kfree(data); kvfree(data); return -EFAULT; } ret = glink_tx(devp->handle, data, data, count, GLINK_TX_REQ_INTENT); if (ret) { GLINK_PKT_ERR("%s glink_tx failed ret[%d]\n", __func__, ret); kfree(data); kvfree(data); return ret; } Loading