提交 a8bb3fd9 编写于 作者: A Anna, Suman 提交者: Bjorn Andersson

rpmsg: remove pointless OOM prints

These types of error prints are superfluous. The system will
pick up on OOM issues and let the user know. While at this,
fix the usage of using a structure instead of the actual
variable in one of the allocations.
Signed-off-by: NSuman Anna <s-anna@ti.com>
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
上级 6c49fbe3
......@@ -220,10 +220,8 @@ static struct rpmsg_endpoint *__rpmsg_create_ept(struct virtproc_info *vrp,
struct device *dev = rpdev ? &rpdev->dev : &vrp->vdev->dev;
ept = kzalloc(sizeof(*ept), GFP_KERNEL);
if (!ept) {
dev_err(dev, "failed to kzalloc a new ept\n");
if (!ept)
return NULL;
}
kref_init(&ept->refcount);
mutex_init(&ept->cb_lock);
......@@ -514,11 +512,9 @@ static struct rpmsg_channel *rpmsg_create_channel(struct virtproc_info *vrp,
return NULL;
}
rpdev = kzalloc(sizeof(struct rpmsg_channel), GFP_KERNEL);
if (!rpdev) {
pr_err("kzalloc failed\n");
rpdev = kzalloc(sizeof(*rpdev), GFP_KERNEL);
if (!rpdev)
return NULL;
}
rpdev->vrp = vrp;
rpdev->src = chinfo->src;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册