rpmsg: remove pointless OOM prints
authorAnna, Suman <s-anna@ti.com>
Fri, 12 Aug 2016 23:42:24 +0000 (18:42 -0500)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 13 Aug 2016 04:26:18 +0000 (21:26 -0700)
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>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/virtio_rpmsg_bus.c

index 494407fdf9f24dc1d2e74e552648a5b3019c5b9e..04fd6bd22a7206bc1dcf583f7d0ce875a859cdc2 100644 (file)
@@ -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;