media: staging/intel-ipu3: Cleanup dummy buffers via helper
Use an existing helper imgu_video_nodes_exit() on imgu-video-node initialization failure path to cleanup dummy buffers. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
1ad037645a
commit
dbdc7237ec
@ -440,6 +440,16 @@ fail_start_streaming:
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void imgu_video_nodes_exit(struct imgu_device *imgu)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < IMGU_MAX_PIPE_NUM; i++)
|
||||||
|
imgu_dummybufs_cleanup(imgu, i);
|
||||||
|
|
||||||
|
imgu_v4l2_unregister(imgu);
|
||||||
|
}
|
||||||
|
|
||||||
static int imgu_video_nodes_init(struct imgu_device *imgu)
|
static int imgu_video_nodes_init(struct imgu_device *imgu)
|
||||||
{
|
{
|
||||||
struct v4l2_pix_format_mplane *fmts[IPU3_CSS_QUEUES] = { NULL };
|
struct v4l2_pix_format_mplane *fmts[IPU3_CSS_QUEUES] = { NULL };
|
||||||
@ -489,24 +499,11 @@ static int imgu_video_nodes_init(struct imgu_device *imgu)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_cleanup:
|
out_cleanup:
|
||||||
for (j = 0; j < IMGU_MAX_PIPE_NUM; j++)
|
imgu_video_nodes_exit(imgu);
|
||||||
imgu_dummybufs_cleanup(imgu, j);
|
|
||||||
|
|
||||||
imgu_v4l2_unregister(imgu);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void imgu_video_nodes_exit(struct imgu_device *imgu)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < IMGU_MAX_PIPE_NUM; i++)
|
|
||||||
imgu_dummybufs_cleanup(imgu, i);
|
|
||||||
|
|
||||||
imgu_v4l2_unregister(imgu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************** PCI interface ****************/
|
/**************** PCI interface ****************/
|
||||||
|
|
||||||
static irqreturn_t imgu_isr_threaded(int irq, void *imgu_ptr)
|
static irqreturn_t imgu_isr_threaded(int irq, void *imgu_ptr)
|
||||||
|
Reference in New Issue
Block a user