Loading drivers/soc/qcom/msm_glink_pkt.c +8 −5 Original line number Diff line number Diff line 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 @@ -397,7 +398,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 @@ -775,7 +776,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 @@ -784,14 +787,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 +8 −5 Original line number Diff line number Diff line 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 @@ -397,7 +398,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 @@ -775,7 +776,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 @@ -784,14 +787,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