All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] [media] v4l: xilinx: missing error code
@ 2015-06-24 14:28 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-06-24 14:28 UTC (permalink / raw)
  To: Hyun Kwon
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek,
	Sören Brinkmann, linux-media, kernel-janitors

We should set "ret" on this error path instead of returning success.

Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index 98e50e4..e779c93 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
 
 	/* ... and the buffers queue... */
 	dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev);
-	if (IS_ERR(dma->alloc_ctx))
+	if (IS_ERR(dma->alloc_ctx)) {
+		ret = PTR_ERR(dma->alloc_ctx);
 		goto error;
+	}
 
 	/* Don't enable VB2_READ and VB2_WRITE, as using the read() and write()
 	 * V4L2 APIs would be inefficient. Testing on the command line with a

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch] [media] v4l: xilinx: missing error code
@ 2015-06-24 14:28 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-06-24 14:28 UTC (permalink / raw)
  To: Hyun Kwon
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek,
	Sören Brinkmann, linux-media, kernel-janitors

We should set "ret" on this error path instead of returning success.

Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index 98e50e4..e779c93 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
 
 	/* ... and the buffers queue... */
 	dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev);
-	if (IS_ERR(dma->alloc_ctx))
+	if (IS_ERR(dma->alloc_ctx)) {
+		ret = PTR_ERR(dma->alloc_ctx);
 		goto error;
+	}
 
 	/* Don't enable VB2_READ and VB2_WRITE, as using the read() and write()
 	 * V4L2 APIs would be inefficient. Testing on the command line with a

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [patch] [media] v4l: xilinx: missing error code
  2015-06-24 14:28 ` Dan Carpenter
@ 2015-06-24 16:14   ` Hyun Kwon
  -1 siblings, 0 replies; 6+ messages in thread
From: Hyun Kwon @ 2015-06-24 16:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek,
	Soren Brinkmann, linux-media, kernel-janitors

Hi Dan,

Thanks for the patch.

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Wednesday, June 24, 2015 7:29 AM
> To: Hyun Kwon
> Cc: Laurent Pinchart; Mauro Carvalho Chehab; Michal Simek; Soren Brinkmann;
> linux-media@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] [media] v4l: xilinx: missing error code
>
> We should set "ret" on this error path instead of returning success.
>
> Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Hyun Kwon <hyun.kwon@xilinx.com>

Thanks,
-hyun



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [patch] [media] v4l: xilinx: missing error code
@ 2015-06-24 16:14   ` Hyun Kwon
  0 siblings, 0 replies; 6+ messages in thread
From: Hyun Kwon @ 2015-06-24 16:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek,
	Soren Brinkmann, linux-media, kernel-janitors

SGkgRGFuLA0KDQpUaGFua3MgZm9yIHRoZSBwYXRjaC4NCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3Nh
Z2UtLS0tLQ0KPiBGcm9tOiBEYW4gQ2FycGVudGVyIFttYWlsdG86ZGFuLmNhcnBlbnRlckBvcmFj
bGUuY29tXQ0KPiBTZW50OiBXZWRuZXNkYXksIEp1bmUgMjQsIDIwMTUgNzoyOSBBTQ0KPiBUbzog
SHl1biBLd29uDQo+IENjOiBMYXVyZW50IFBpbmNoYXJ0OyBNYXVybyBDYXJ2YWxobyBDaGVoYWI7
IE1pY2hhbCBTaW1lazsgU29yZW4gQnJpbmttYW5uOw0KPiBsaW51eC1tZWRpYUB2Z2VyLmtlcm5l
bC5vcmc7IGtlcm5lbC1qYW5pdG9yc0B2Z2VyLmtlcm5lbC5vcmcNCj4gU3ViamVjdDogW3BhdGNo
XSBbbWVkaWFdIHY0bDogeGlsaW54OiBtaXNzaW5nIGVycm9yIGNvZGUNCj4NCj4gV2Ugc2hvdWxk
IHNldCAicmV0IiBvbiB0aGlzIGVycm9yIHBhdGggaW5zdGVhZCBvZiByZXR1cm5pbmcgc3VjY2Vz
cy4NCj4NCj4gRml4ZXM6IGRmMzMwNTE1NmY5OCAoJ1ttZWRpYV0gdjRsOiB4aWxpbng6IEFkZCBY
aWxpbnggVmlkZW8gSVAgY29yZScpDQo+IFNpZ25lZC1vZmYtYnk6IERhbiBDYXJwZW50ZXIgPGRh
bi5jYXJwZW50ZXJAb3JhY2xlLmNvbT4NCg0KQWNrZWQtYnk6IEh5dW4gS3dvbiA8aHl1bi5rd29u
QHhpbGlueC5jb20+DQoNClRoYW5rcywNCi1oeXVuDQoNCg0KDQpUaGlzIGVtYWlsIGFuZCBhbnkg
YXR0YWNobWVudHMgYXJlIGludGVuZGVkIGZvciB0aGUgc29sZSB1c2Ugb2YgdGhlIG5hbWVkIHJl
Y2lwaWVudChzKSBhbmQgY29udGFpbihzKSBjb25maWRlbnRpYWwgaW5mb3JtYXRpb24gdGhhdCBt
YXkgYmUgcHJvcHJpZXRhcnksIHByaXZpbGVnZWQgb3IgY29weXJpZ2h0ZWQgdW5kZXIgYXBwbGlj
YWJsZSBsYXcuIElmIHlvdSBhcmUgbm90IHRoZSBpbnRlbmRlZCByZWNpcGllbnQsIGRvIG5vdCBy
ZWFkLCBjb3B5LCBvciBmb3J3YXJkIHRoaXMgZW1haWwgbWVzc2FnZSBvciBhbnkgYXR0YWNobWVu
dHMuIERlbGV0ZSB0aGlzIGVtYWlsIG1lc3NhZ2UgYW5kIGFueSBhdHRhY2htZW50cyBpbW1lZGlh
dGVseS4NCg0K

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] [media] v4l: xilinx: missing error code
  2015-06-24 14:28 ` Dan Carpenter
@ 2015-06-25 21:36   ` Laurent Pinchart
  -1 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2015-06-25 21:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hyun Kwon, Mauro Carvalho Chehab, Michal Simek,
	Sören Brinkmann, linux-media, kernel-janitors

Hi Dan,

Thank you for the patch.

On Wednesday 24 June 2015 17:28:31 Dan Carpenter wrote:
> We should set "ret" on this error path instead of returning success.
> 
> Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree.

> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c
> b/drivers/media/platform/xilinx/xilinx-dma.c index 98e50e4..e779c93 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev,
> struct xvip_dma *dma,
> 
>  	/* ... and the buffers queue... */
>  	dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev);
> -	if (IS_ERR(dma->alloc_ctx))
> +	if (IS_ERR(dma->alloc_ctx)) {
> +		ret = PTR_ERR(dma->alloc_ctx);
>  		goto error;
> +	}
> 
>  	/* Don't enable VB2_READ and VB2_WRITE, as using the read() and write()
>  	 * V4L2 APIs would be inefficient. Testing on the command line with a

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] [media] v4l: xilinx: missing error code
@ 2015-06-25 21:36   ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2015-06-25 21:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hyun Kwon, Mauro Carvalho Chehab, Michal Simek,
	Sören Brinkmann, linux-media, kernel-janitors

Hi Dan,

Thank you for the patch.

On Wednesday 24 June 2015 17:28:31 Dan Carpenter wrote:
> We should set "ret" on this error path instead of returning success.
> 
> Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree.

> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c
> b/drivers/media/platform/xilinx/xilinx-dma.c index 98e50e4..e779c93 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -699,8 +699,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev,
> struct xvip_dma *dma,
> 
>  	/* ... and the buffers queue... */
>  	dma->alloc_ctx = vb2_dma_contig_init_ctx(dma->xdev->dev);
> -	if (IS_ERR(dma->alloc_ctx))
> +	if (IS_ERR(dma->alloc_ctx)) {
> +		ret = PTR_ERR(dma->alloc_ctx);
>  		goto error;
> +	}
> 
>  	/* Don't enable VB2_READ and VB2_WRITE, as using the read() and write()
>  	 * V4L2 APIs would be inefficient. Testing on the command line with a

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-25 21:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 14:28 [patch] [media] v4l: xilinx: missing error code Dan Carpenter
2015-06-24 14:28 ` Dan Carpenter
2015-06-24 16:14 ` Hyun Kwon
2015-06-24 16:14   ` Hyun Kwon
2015-06-25 21:36 ` Laurent Pinchart
2015-06-25 21:36   ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.