Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3772c2b authored by Jingoo Han's avatar Jingoo Han Committed by Felipe Balbi
Browse files

usb: gadget: mv_u3d_core: remove unnecessary OOM messages



The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c797f7fd
Loading
Loading
Loading
Loading
+2 −12
Original line number Original line Diff line number Diff line
@@ -297,10 +297,8 @@ static struct mv_u3d_trb *mv_u3d_build_trb_one(struct mv_u3d_req *req,
	u3d = req->ep->u3d;
	u3d = req->ep->u3d;


	trb = kzalloc(sizeof(*trb), GFP_ATOMIC);
	trb = kzalloc(sizeof(*trb), GFP_ATOMIC);
	if (!trb) {
	if (!trb)
		dev_err(u3d->dev, "%s, trb alloc fail\n", __func__);
		return NULL;
		return NULL;
	}


	/*
	/*
	 * Be careful that no _GFP_HIGHMEM is set,
	 * Be careful that no _GFP_HIGHMEM is set,
@@ -446,17 +444,12 @@ static int mv_u3d_req_to_trb(struct mv_u3d_req *req)
			trb_num++;
			trb_num++;


		trb = kcalloc(trb_num, sizeof(*trb), GFP_ATOMIC);
		trb = kcalloc(trb_num, sizeof(*trb), GFP_ATOMIC);
		if (!trb) {
		if (!trb)
			dev_err(u3d->dev,
					"%s, trb alloc fail\n", __func__);
			return -ENOMEM;
			return -ENOMEM;
		}


		trb_hw = kcalloc(trb_num, sizeof(*trb_hw), GFP_ATOMIC);
		trb_hw = kcalloc(trb_num, sizeof(*trb_hw), GFP_ATOMIC);
		if (!trb_hw) {
		if (!trb_hw) {
			kfree(trb);
			kfree(trb);
			dev_err(u3d->dev,
					"%s, trb_hw alloc fail\n", __func__);
			return -ENOMEM;
			return -ENOMEM;
		}
		}


@@ -1811,7 +1804,6 @@ static int mv_u3d_probe(struct platform_device *dev)


	u3d = kzalloc(sizeof(*u3d), GFP_KERNEL);
	u3d = kzalloc(sizeof(*u3d), GFP_KERNEL);
	if (!u3d) {
	if (!u3d) {
		dev_err(&dev->dev, "failed to allocate memory for u3d\n");
		retval = -ENOMEM;
		retval = -ENOMEM;
		goto err_alloc_private;
		goto err_alloc_private;
	}
	}
@@ -1905,7 +1897,6 @@ static int mv_u3d_probe(struct platform_device *dev)
	size = u3d->max_eps * sizeof(struct mv_u3d_ep) * 2;
	size = u3d->max_eps * sizeof(struct mv_u3d_ep) * 2;
	u3d->eps = kzalloc(size, GFP_KERNEL);
	u3d->eps = kzalloc(size, GFP_KERNEL);
	if (!u3d->eps) {
	if (!u3d->eps) {
		dev_err(&dev->dev, "allocate ep memory failed\n");
		retval = -ENOMEM;
		retval = -ENOMEM;
		goto err_alloc_eps;
		goto err_alloc_eps;
	}
	}
@@ -1913,7 +1904,6 @@ static int mv_u3d_probe(struct platform_device *dev)
	/* initialize ep0 status request structure */
	/* initialize ep0 status request structure */
	u3d->status_req = kzalloc(sizeof(struct mv_u3d_req) + 8, GFP_KERNEL);
	u3d->status_req = kzalloc(sizeof(struct mv_u3d_req) + 8, GFP_KERNEL);
	if (!u3d->status_req) {
	if (!u3d->status_req) {
		dev_err(&dev->dev, "allocate status_req memory failed\n");
		retval = -ENOMEM;
		retval = -ENOMEM;
		goto err_alloc_status_req;
		goto err_alloc_status_req;
	}
	}