* [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init()
@ 2023-07-17 20:09 Christophe JAILLET
2023-07-18 6:58 ` Dan Carpenter
2023-08-07 10:52 ` Hans Verkuil
0 siblings, 2 replies; 4+ messages in thread
From: Christophe JAILLET @ 2023-07-17 20:09 UTC (permalink / raw)
To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
Matthias Brugger, AngeloGioacchino Del Regno, Xiaoyong Lu,
Nicolas Dufresne, Hans Verkuil
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-media,
linux-arm-kernel, linux-mediatek
All errors go to the error handling path, except this one. Be consistent
and also branch to it.
Fixes: 2f5d0aef37c6 ("media: mediatek: vcodec: support stateless AV1 decoder")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
index 04e6dc6cfa1d..c6cc2785e0e8 100644
--- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
+++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
@@ -338,14 +338,16 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue,
err = mtk_vcodec_mem_alloc(ctx, &lat_buf->rd_mv_addr);
if (err) {
mtk_v4l2_err("failed to allocate rd_mv_addr buf[%d]", i);
- return -ENOMEM;
+ err = -ENOMEM;
+ goto mem_alloc_err;
}
lat_buf->tile_addr.size = VDEC_LAT_TILE_SZ;
err = mtk_vcodec_mem_alloc(ctx, &lat_buf->tile_addr);
if (err) {
mtk_v4l2_err("failed to allocate tile_addr buf[%d]", i);
- return -ENOMEM;
+ err = -ENOMEM;
+ goto mem_alloc_err;
}
}
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init()
2023-07-17 20:09 [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init() Christophe JAILLET
@ 2023-07-18 6:58 ` Dan Carpenter
2023-07-18 18:39 ` Christophe JAILLET
2023-08-07 10:52 ` Hans Verkuil
1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2023-07-18 6:58 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
Matthias Brugger, AngeloGioacchino Del Regno, Xiaoyong Lu,
Nicolas Dufresne, Hans Verkuil, linux-kernel, kernel-janitors,
linux-media, linux-arm-kernel, linux-mediatek
On Mon, Jul 17, 2023 at 10:09:19PM +0200, Christophe JAILLET wrote:
> All errors go to the error handling path, except this one. Be consistent
> and also branch to it.
>
> Fixes: 2f5d0aef37c6 ("media: mediatek: vcodec: support stateless AV1 decoder")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
I sent this one a month ago but it hasn't been applied.
https://lore.kernel.org/all/b8948d9a-65bc-4f3f-aa90-60addd064819@moroto.mountain/
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init()
2023-07-18 6:58 ` Dan Carpenter
@ 2023-07-18 18:39 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2023-07-18 18:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
Matthias Brugger, AngeloGioacchino Del Regno, Xiaoyong Lu,
Nicolas Dufresne, Hans Verkuil, linux-kernel, kernel-janitors,
linux-media, linux-arm-kernel, linux-mediatek
Le 18/07/2023 à 08:58, Dan Carpenter a écrit :
> On Mon, Jul 17, 2023 at 10:09:19PM +0200, Christophe JAILLET wrote:
>> All errors go to the error handling path, except this one. Be consistent
>> and also branch to it.
>>
>> Fixes: 2f5d0aef37c6 ("media: mediatek: vcodec: support stateless AV1 decoder")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>
> I sent this one a month ago but it hasn't been applied.
>
> https://lore.kernel.org/all/b8948d9a-65bc-4f3f-aa90-60addd064819@moroto.mountain/
>
> regards,
> dan carpenter
>
>
Hi Dan,
your patch is better than mine.
Less verbose and more complete.
CJ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init()
2023-07-17 20:09 [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init() Christophe JAILLET
2023-07-18 6:58 ` Dan Carpenter
@ 2023-08-07 10:52 ` Hans Verkuil
1 sibling, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2023-08-07 10:52 UTC (permalink / raw)
To: Christophe JAILLET, Tiffany Lin, Andrew-CT Chen, Yunfei Dong,
Mauro Carvalho Chehab, Matthias Brugger,
AngeloGioacchino Del Regno, Xiaoyong Lu, Nicolas Dufresne
Cc: linux-kernel, kernel-janitors, linux-media, linux-arm-kernel,
linux-mediatek
Hi Christophe,
This no longer applies after some major rework of the driver from Yunfei that
was merged to our media_stage tree.
Can you rebase this patch (if it is even still relevant)?
Thanks,
Hans
On 17/07/2023 22:09, Christophe JAILLET wrote:
> All errors go to the error handling path, except this one. Be consistent
> and also branch to it.
>
> Fixes: 2f5d0aef37c6 ("media: mediatek: vcodec: support stateless AV1 decoder")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
> index 04e6dc6cfa1d..c6cc2785e0e8 100644
> --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
> +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
> @@ -338,14 +338,16 @@ int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue,
> err = mtk_vcodec_mem_alloc(ctx, &lat_buf->rd_mv_addr);
> if (err) {
> mtk_v4l2_err("failed to allocate rd_mv_addr buf[%d]", i);
> - return -ENOMEM;
> + err = -ENOMEM;
> + goto mem_alloc_err;
> }
>
> lat_buf->tile_addr.size = VDEC_LAT_TILE_SZ;
> err = mtk_vcodec_mem_alloc(ctx, &lat_buf->tile_addr);
> if (err) {
> mtk_v4l2_err("failed to allocate tile_addr buf[%d]", i);
> - return -ENOMEM;
> + err = -ENOMEM;
> + goto mem_alloc_err;
> }
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-07 10:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 20:09 [PATCH] media: mediatek: vcodec: Fix an error handling path in vdec_msg_queue_init() Christophe JAILLET
2023-07-18 6:58 ` Dan Carpenter
2023-07-18 18:39 ` Christophe JAILLET
2023-08-07 10:52 ` Hans Verkuil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®