Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1461517 > unrolled thread
| Started by | Suman Anna <s-anna@ti.com> |
|---|---|
| First post | 2016-08-13 01:50 +0200 |
| Last post | 2016-08-13 01:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 09/13] rpmsg: remove pointless OOM prints Suman Anna <s-anna@ti.com> - 2016-08-13 01:50 +0200
| From | Suman Anna <s-anna@ti.com> |
|---|---|
| Date | 2016-08-13 01:50 +0200 |
| Subject | [PATCH 09/13] rpmsg: remove pointless OOM prints |
| Message-ID | <s5un7-6A-9@gated-at.bofh.it> |
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: Suman Anna <s-anna@ti.com>
---
drivers/rpmsg/virtio_rpmsg_bus.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index fe03b2aef450..1dbe756a987d 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -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;
--
2.9.0
Back to top | Article view | linux.kernel
csiph-web